Created
May 28, 2013 17:30
-
-
Save mostlyobvious/5664500 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bogus/rspec' | |
class Foo | |
def bar(baz, default = nil) | |
end | |
end | |
describe 'default arguments' do | |
fake(:foo) | |
specify do | |
arg = "dummy" | |
foo.bar(arg) | |
expect(foo).to have_received.bar(arg) # this fails but I belive it should not | |
expect(foo).to have_received.bar(arg, {}) # somehow this is expected | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment