Comments (5)
first I'd say go pick another testing tool, autotest is pretty old and pretty bad,
I think you might be able to just do a self.sleep = 0
in your .autotest, since the extensions are loaded in the autotest object
https://github.com/grosser/autotest/blob/master/lib/autotest.rb#L307
from autotest.
I usually use guard but one project I'm on uses Minitest which won't work with spork and guard. Autotest works and the above fix does work. self.sleep=0 doesn't work within the reopened .autotest class nor outside it.
I'll just post my .autotest file in case it helps someone. It works, I just hate how hacky it is. I wish I could get to the instance of autotest better or catch the init in a Rails initializer?
require 'autotest/fsevent'
class Autotest
# does not work
# self.sleep = 0
# run tests over drb server (spork)
def make_test_cmd files_to_test
if files_to_test.empty?
"" # no tests to run
else
"testdrb #{files_to_test.keys.join(' ')}"
end
end
end
# tighten up the time before the test is run
ObjectSpace.each_object(Autotest).first.sleep = 0
# does not work
#self.sleep = 0
from autotest.
Looks like load has no access to the current scope (not event instance vars)
it's a weird spot since autotest is already initialized + you do not get access to the instance.
A way would be to have Autotest.sleep and when sleeping do sleep sleep || self.class.sleep
so you could overwrite it.
I'd merge a pull for this if you care enough to build it :)
from autotest.
I'll work on it then. :)
Issue #34 pull request opened for this.
from autotest.
❤️
from autotest.
Related Issues (20)
- rails3 ruby1.9.2-p0 errors HOT 6
- Autotest doesn't work with the new way to require spec_helper in RSpec specs HOT 2
- Feature: parallel specs HOT 31
- autotest-rails-pure should require autotest HOT 3
- Start parallel_test from curent directory HOT 1
- 'C:' is not recognized as an internal or external command, (Windows Vista) HOT 6
- [Windows] autotest-standalone-4.5.2/lib/unit_diff.rb:77:in `write': Invalid argument (Errno::EINVAL) HOT 12
- Specifying the -n option on mac 10.6.6 HOT 2
- Encoding UTF-8 Error HOT 1
- Tests get run twice HOT 2
- Autotest doesn't respond to Ctrl-C HOT 15
- Autotest / spork ? HOT 4
- History.txt not updated. HOT 1
- How do I configure Autotest to run all tests whenever a file changes in either lib/ or spec/? HOT 7
- Doesn't work in Windows... HOT 1
- Question regarding the usage tip HOT 4
- Won't run, complains about missing require HOT 8
- No tests matched ...(every test)... HOT 2
- Does not run model tests! HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autotest.