[rspec-users] Autotest will run features, but not specs

David Chelimsky dchelimsky at gmail.com
Sat Aug 28 11:52:17 EDT 2010


On Aug 27, 2010, at 8:06 AM, David Chelimsky wrote:

> On Aug 27, 2010, at 6:47 AM, Brennon Bortz wrote:
> 
>> Not sure what I must have bumped, but autotest won't run any specs--only features.  No errors are given on startup.  I've taken "export AUTOFEATURE=true" out of my ./bashrc file--now I just get a blank screen when running autotest.  Adding "export RSPEC=true" to .bashrc doesn't change anything either.
>> 
>> # ~/.autotest
>> require 'autotest/growl'
>> 
>> Autotest.add_hook(:initialize) { |at|
>> at.add_exception %r{^\.git}  # ignore Version Control System
>> at.add_exception %r{^./tmp}  # ignore temp files, lest autotest will run again, and again...
>> #  at.clear_mappings         # take out the default (test/test*rb)
>> at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
>>   Dir['spec/**/*.rb']
>> }
>> nil
>> }
>> 
>> Autotest.add_hook :initialize do |at|
>> at.add_mapping(%r%^spec/(integration)/.*rb$%) {|filename, _|
>>   filename
>> }
>> end 
>> 
>> # {RAILS_ROOT}/autotest/.discover.rb
>> Autotest.add_discovery { "rails" }
>> Autotest.add_discovery { "rspec2" }   
>> 
>> # {RAILS_ROOT/.rspec
>> --format nested
>> --color
>> 
>> Output when running autotest:
>> 
>> $ RSPEC=true autotest
>> (Not running features.  To run features in autotest, set AUTOFEATURE=true.)
>> loading autotest/rails
>> 
>> 
>> --------------------------------------------------------------------------------
>> 
>> 
>> And, here are my bundled gems: 
>> 
>> Gems included by the bundle:
>> * abstract (1.0.0)
>> * actionmailer (3.0.0.rc)
>> * actionpack (3.0.0.rc)
>> * activemodel (3.0.0.rc)
>> * activerecord (3.0.0.rc)
>> * activeresource (3.0.0.rc)
>> * activesupport (3.0.0.rc)
>> * arel (0.4.0)
>> * builder (2.1.2)
>> * bundler (1.0.0.rc.6)
>> * capybara (0.3.9)
>> * cucumber (0.8.5)
>> * cucumber-rails (0.3.2)
>> * culerity (0.2.12)
>> * diff-lcs (1.1.2)
>> * erubis (2.6.6)
>> * ffi (0.6.3)
>> * gherkin (2.1.5)
>> * i18n (0.4.1)
>> * json_pure (1.4.6)
>> * mail (2.2.5)
>> * mime-types (1.16)
>> * nokogiri (1.4.3.1)
>> * polyglot (0.3.1)
>> * rack (1.2.1)
>> * rack-mount (0.6.12)
>> * rack-test (0.5.4)
>> * rails (3.0.0.rc)
>> * railties (3.0.0.rc)
>> * rake (0.8.7)
>> * rspec (2.0.0.beta.20)
>> * rspec-core (2.0.0.beta.20)
>> * rspec-expectations (2.0.0.beta.20)
>> * rspec-mocks (2.0.0.beta.20)
>> * rspec-rails (2.0.0.beta.20)
>> * rubyzip (0.9.4)
>> * selenium-webdriver (0.0.28)
>> * sqlite3-ruby (1.3.1)
>> * term-ansicolor (1.0.5)
>> * thor (0.14.0)
>> * treetop (1.4.8)
>> * trollop (1.16.2)
>> * tzinfo (0.3.23)
>> 
>> This is driving me up the wall...any ideas?
> 
> 1. Get rid of 'Autotest.add_discovery { "rails" }' from ./autotest/discover.rb.
> 2. Add autotest-rails to the Gemfile.

Apologies - this changed and I forgot. Put "Autotest.add_discovery { "rails" }" back in ./autotest/discover.rb and put autotest (not autotest-rails) in the Gemfile.

HTH,
David


More information about the rspec-users mailing list