[rspec-users] textmate => pass, autotest => failing specs ???

Bryan Ray bryansray at gmail.com
Tue Apr 15 18:23:33 EDT 2008

That'll learn ya to use Mocha over rSpec ;)

On Tue, Apr 15, 2008 at 2:27 PM, Giuseppe Bertini <lists at ruby-forum.com>

> > catch any dependencies your tests may have on each other
> > in order to reveal brittle tests.
> Following Ben's hint, I took out examples from the controller spec until
> I isolated the culprit.
> Briefly, I am switching from RSpec's built in mocking framework to Mocha
> and fixture_scenarios when necessary. I had forgotten to modify one of
> the examples, which still had this construct:
>  object.should_receive(:method).and_return(:a_mock)
> instead of Mocha's:
>  object.expects(:method).returns(:a_mock)
> So I have empirically learned that enabling
>  config.mock_with :mocha
> in /spec/spec_helper.rb and then mixing Mocha with RSpec's own
> mocking/stubbing messes things up in a nasty way, in the sense that
> failures occur all over the place with error messages that did not help
> me finding the bug.
> And again, these errors were not raised by TextMate's environment.
> Tricky.
> Thanks for the feedback!
> Giuseppe
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Bryan Ray

"Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080415/896704e0/attachment.html 

More information about the rspec-users mailing list