[rspec-users] Just a quick question on David's new-controller-examples
Mark Wilden
mark at mwilden.com
Wed Oct 15 13:26:00 EDT 2008
I have a different question about the article (pity comments are closed).
def mock_account(stubs={})
stubs = {
:save => true,
:update_attributes => true,
:destroy => true,
:to_xml => ''
}.merge(stubs)
@mock_account ||= mock_model(Account, stubs)
end
With this helper, doesn't @mock_account only get set once inside its
'describe' block? Any future tests would use the same @mock_account, even if
other stubs were designated.
I'm probably missing something very obvious.
///ark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081015/99831819/attachment.html>
More information about the rspec-users
mailing list