[rspec-users] why does "ruby <spec_file>" work, but "rake spec" give spec errors?

David Chelimsky dchelimsky at gmail.com
Tue Dec 23 20:33:54 EST 2008

On Tue, Dec 23, 2008 at 8:29 PM, Greg Hauptmann
<greg.hauptmann.ruby at gmail.com> wrote:
> Hi,
> Does anyone know why I would have some spec's failing when using
> "./script/autospec" or "rake spec", however when I just run them using "ruby
> <spec file>" it passes ok"?   What's the difference in kicking off a spec by
> these different means?

This is typically due to some accidental dependencies between examples.

What sorts of failures are you getting?

> Only thing that comes to mind is perhaps using "ruby <spec file>" is maybe
> working in the development environment not the test environment?  However I
> have tried running "rake db:migrate RAILS_ENV=test", as well as doing a
> "rake db:test:purge" and then "rake db:test:prepare"...
> Thanks
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list