[rspec-users] Inconsistent Test results w/ Autotest vs just rspec ./spec

JDeville jeffdeville at gmail.com
Tue Dec 21 21:26:36 EST 2010


Problem -------------------------------------------------------


When I run autotest against my rails 3 app, I get some errors that
seem to imply that my @ variables are not be cleared for each
context.  It happens only in my controller tests, but that may simply
be a coincidence.  When autotest tests either of these controllers in
isolation, the tests pass.  The first one is not messing up the second
(I tried commenting out the first breaking test)

When I run the entire spec w/ just rspec ./spec, everything passes.  I
tried to emulate what autotest calls with:
bundle exec /Volumes/files/jeffdeville/.rvm/rubies/ree-1.8.7-2010.02/
bin/ruby -S /Volumes/files/jeffdeville/.rvm/gems/ree-1.8.7-2010.02/
gems/rspec-core-2.3.1/bin/rspec --tty ./spec
(I just replaced the individual file names with ./spec).  That worked
fine too.


Environment  -------------------------------------------------------


Gemfile bits -----------
group :test, :stress do
        gem 'mongoid-rspec'
        gem 'mocha'
	gem "rspec"
        gem "rspec-rails"
	gem "bourne"
        gem 'factory_girl_rails'
        gem "ZenTest"
        gem "autotest"
        gem "autotest-rails"
        gem "cucumber"
	gem "launchy"
        gem "gherkin"
        gem "cucumber-rails"
        gem "webrat"
	gem "capybara"
        gem "capybara-envjs"
	gem 'selenium-client'
	gem 'fakeweb'
	gem 'vcr'
	gem "httparty"
	gem 'rpm_contrib'
	gem 'newrelic_rpm'
	gem 'fuubar'
	gem 'ruby-debug'
end

Here are the gem versions being used.  I've tried to filter it to just
the ones I could see being relevant.
Using ZenTest (4.4.2)
Using autotest (4.4.6)
Using autotest-rails (4.1.0)
Using mocha (0.9.8)
Using bourne (1.0)
Using bundler (1.0.7)
Using term-ansicolor (1.0.5)
Using factory_girl (1.3.2)
Using rails (3.0.3)
Using factory_girl_rails (1.0)
Using rspec-core (2.3.1)
Using rspec-expectations (2.3.0)
Using rspec-mocks (2.3.0)
Using rspec (2.3.0)
Using rspec-instafail (0.1.5)
Using ruby-progressbar (0.0.9)
Using mongoid-rspec (1.3.2)
Using rspec-rails (2.3.1)

I'm using ruby 1.8.7 REE

I'm afraid I don't really know how autotest works

I didn't seem to have this problem until recently, so I'm wondering if
a recent release requires me to change something that I missed.

Thanks


More information about the rspec-users mailing list