<div dir="ltr">Pat,<br><br>In an earlier message, you wrote:<br><br><blockquote>it "should find the book" do<br>
Book.should_receive(:find).with("1")<br>
get :show, :id => "1"<br>
end<br><br>
[snip]<br><br>
it "should assign the book to the view" do<br>
get :show, :id => "1"<br>
assigns[:book].should == @mock_book<br>
end<br><br>
Now we've got one example that says we should find the proper book, and<br>
another one that says we should assign it to the view. And with these<br>
two, we can be confident everything is set up properly because there'd<br>
be no way for @mock_book to make it to the view were it not the same<br>
object returned by Book.find.<br></blockquote><div id=":36" class="ArwC7c ckChnd">
Where does @mock_book come from? A before block?<br><br>Thanks,<br>Craig</div><br></div>