Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created December 10, 2008 14:05
Show Gist options
  • Save dchelimsky/34329 to your computer and use it in GitHub Desktop.
Save dchelimsky/34329 to your computer and use it in GitHub Desktop.
template = mock('template')
template.should_receive(:update_attributes!)
Template.should_receive(:find).with("37").and_return(template)
@response = request(resource(template), :method => "PUT") # raises Resource route not found: [#<Spec::Mocks::Mock:0x110e5cc @name="template">]
@response = request("/admin/templates/37", :method => "PUT") # passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment