Skip to content

Instantly share code, notes, and snippets.

@pd
Created August 12, 2008 21:54
Show Gist options
  • Save pd/5155 to your computer and use it in GitHub Desktop.
Save pd/5155 to your computer and use it in GitHub Desktop.
class Foo; end
describe 'foo' do
it "should not be borked" do
Foo.should_receive('baz').with('huh', :include => [:a, :b], :conditions => {:c => :d})
Foo.baz('huh', {:include => [:a, :b]}, :conditions => {:c => :d})
end
end
-- % spec foo_spec.rb
F
1)
Spec::Mocks::MockExpectationError in 'foo should not be borked'
Mock 'Class' expected :baz with ("huh", {:conditions=>{:c=>:d}, :include=>[:a, :b]}) but received it with ("huh", {:include=>[:a, :b]}, {:conditions=>{:c=>:d}})
./foo_spec.rb:5:
Finished in 0.018474 seconds
1 example, 1 failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment