Skip to content

Instantly share code, notes, and snippets.

@mostlyobvious
Created May 28, 2013 17:41
Show Gist options
  • Save mostlyobvious/5664592 to your computer and use it in GitHub Desktop.
Save mostlyobvious/5664592 to your computer and use it in GitHub Desktop.
require 'bogus/rspec'
class Foo
def bar(baz, ene = nil, due = nil)
end
end
describe 'default arguments' do
fake(:foo)
specify do
arg1, arg2 = "dummy", "muddy"
foo.bar(arg1, arg2)
expect(foo).to have_received.bar(arg1, arg2) # this fails but I belive it should not
expect(foo).to have_received.bar(arg1, arg2, {}) # somehow this is expected
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment