Displaying 1 result from an estimated 1 matches for "clientscontrollerspechelper".
2006 Oct 08
9
Organizing tests and mocha expectations
...ultaneously getting into using Mocha and RSpec-style tests
(courtesy of the simply_bdd plugin) and I''m struggling with some
issues while trying to organize my specs/test. Here''s a code example
illustrating the problem:
context "update cliient invalid data" do
include ClientsControllerSpecHelper
specify "should render edit form" do
setup_controller
@client = mock
Client.expects(:find).with("1").returns(@client)
@client.expects(:attributes=).with("attributes")
@client.expects(:save!).raises(ActiveRecord::RecordInvalid.new(stub(:errors
=...