Displaying 1 result from an estimated 1 matches for "setup_control".
2006 Oct 08
9
Organizing tests and mocha expectations
..._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
=> stub(:full_messages => []))))
@controller.expects(:rend...