On Sat, Jun 27, 2009 at 9:55 AM, Zhenning Guan<[email protected]> wrote: > @weather = mock_model(Weather, :id => "1") > @forecast = mock_model(Forecast, :weather => @weather, :save => true) > > what's the different between with :save => true or without it?
The hash submitted to mock_model sets up method stubs: @weather.save => MockExpectationError "received unexpected message 'save'" @forecast.save => true HTH, David > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
