Guest User

Untitled

a guest
Jun 14th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. it "exposes a newly created account as @account" do
  2. mock_account.stub!(:owner=)
  3. mock_account.stub!(:save).and_return(true)
  4. Account.should_receive(:new).with({'these' => 'params'}).and_return(mock_account(:save => true))
  5. @params[:account] = {:these => 'params'}
  6. do_request
  7. assigns(:account).should equal(mock_account)
  8. end
Add Comment
Please, Sign In to add comment