[rspec-users] ordering dependency in tests?
dchelimsky at gmail.com
Thu Feb 24 13:09:20 EST 2011
On Feb 24, 2011, at 11:55 AM, Fearless Fool wrote:
> I'm baffled. If I do:
> $ bundle exec ruby -S rspec --tty A_spec.rb
> $ bundle exec ruby -S rspec --tty B_spec.rb
> I get no errors. But then if I do:
> $ bundle exec ruby -S rspec --tty A_spec.rb B_spec.rb
> I get an error on B_spec. And if I reverse the order:
> $ bundle exec ruby -S rspec --tty B_spec.rb A_spec.rb
> I get an entirely different error on A_spec.
What are the failures you're seeing?
> I swear that I'm not doing
> any before(:all) anywhere, but clearly there's some state that is
> persisting between the two spec files. I've tried inserting
> $stderr.puts() messages to gain some insight as to what's happening, but
> they seem to be suppressed (is that expected?).
> So: any ideas of gotchas to look out for?
> In the meantime, I'm going to start commenting out blocks of tests in
> A_spec and see when B_spec stops failing.
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users