Skip to content

Instantly share code, notes, and snippets.

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