That'll learn ya to use Mocha over rSpec ;) On Tue, Apr 15, 2008 at 2:27 PM, Giuseppe Bertini <[EMAIL PROTECTED]> wrote:
> > 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 > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users > -- Bryan Ray http://www.bryanray.net "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."
_______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
