[rspec-users] False Positives and Autotest on New Folders

David Chelimsky dchelimsky at gmail.com
Wed Sep 5 15:54:55 EDT 2007

On 9/5/07, Geoffrey Wiseman <geoffrey.wiseman at gmail.com> wrote:
> False Positives
> I just discovered how easy it was to create a false positive when I, trying
> my first RSpec test, did this:
>    ob.should eql?('foo')
> instead of:
>    ob.should eql('foo')
> or:
>    ob.should == 'foo'
> As far as I can see, this is roughly equivalent to:
>   ob.should false
> Neither eql?('foo') nor false causes the spec to fail; this is worrisome, as
> I can imagine accidentally including that ? again; and I'd hate it to mask a
> test failure.
> Autotest
> Out of curiosity, does anyone know how to get autotest to pick up new
> folders under spec/?  Seems like I might have to modify rails_rspec.rb in
> lib/autotest.  We were considering separating our acceptance tests from the
> rest.

You could either modify rails_rspec.rb, or you could add a .autotest
file in the project root and rewrite the mappings there. See autotests
docs for how to do that (look for info on hooks).

>   - Geoffrey
> --
> Geoffrey Wiseman
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list