xaviershay / rspec-fire

Obsolete - use verifying doubles in RSpec 3
MIT License
361 stars 16 forks source link

Don't count block params when determining the max arity. #11

Closed myronmarston closed 12 years ago

myronmarston commented 12 years ago

Before this change, the following worked improperly:

  class A
    def m(a, &b)
    end
  end

  fire_double("A").stub(:m).with(:two, :arguments)

The block arg was counted previously so this passed even though it should not.