before do game = mock_model(Game, :name => 'The Battle for Blaze', :enabled => 'true') puts game.name puts game.enabled game.should_receive(:name).and_return('The Battle for Blaze') game.should_receive(:enabled).and_return('true')
@game = game end I still got the error but I saw in the print out 'The Battle for Blaze' and 'True' So I for some reason thought that if I write unknowingly in my partial <%= h game.enabled %> it might pass and it did. I was thinking that game.should_recieve was test that the mock model being made received Battle for the Blaze like I was confirming that the the model was correct. But then I looked at the code and really thought about it and realized that what it was saying that the Game model was expecting name to be called at some point during that spec and since it hadn't been in the partial such as game.name then it would fail. When I'm working with RSpec I sometimes forget what actually is going on and I interpret how things are happening in a different way. For that pragmatic book will it cover things such as: how to spec a rendered template how to spec a rendered partial how to spec a rendered partial collection how to spec a cookie ... or will it be more of a guide like the RSpec Peepcode videos but in book format with more elaboration. I don't think I would have ever spec'd view if I hadn't started using story runner. I love that story runner.
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users