Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created April 11, 2011 03:08
Show Gist options
  • Save dchelimsky/913008 to your computer and use it in GitHub Desktop.
Save dchelimsky/913008 to your computer and use it in GitHub Desktop.
require 'active_model'
require 'active_support/core_ext'
require 'rspec/rails/mocks'
describe "Foo" do
it "is mockable" do
foo = mock_model("Foo")
foo.id.should eq(1001)
foo.to_param.should eq("1001")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment