rspec / rspec-mocks

RSpec's 'test double' framework, with support for stubbing and mocking
https://rspec.info
MIT License
1.16k stars 357 forks source link

Mocking methods changes `Method#parameters`. #1547

Open ioquatix opened 1 year ago

ioquatix commented 1 year ago

When mocking a method, object.method(:mocked_method).parameters no longer reflects the original method.

I wonder if we can improve that? It may not be practical.

JonRowe commented 1 year ago

I guess because we splat and verify later, it probably is possible to improve this to define same parameter methods for the proxy, but it may break things... definietly would be keen to explore this