Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Forked from jbrains/expect_before_act.rb
Created December 3, 2010 02:18
Show Gist options
  • Save dchelimsky/726479 to your computer and use it in GitHub Desktop.
Save dchelimsky/726479 to your computer and use it in GitHub Desktop.
describe Controller do
context "create" do
it "saves the model" do
model = Model.new
Model.stub(:new).and_return(model)
model.should_receive(:save)
post :create
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment