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
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to