Closed chastell closed 11 years ago
Gaah, this (obviously, when I think about it…) allows passing any arguments as kwarg values and makes have_received
happy as a clam every time. Not sure what’s worse, though, current master (blows up unless there’s a same-named method in scope) or this (always happy and not really verifying anything).
No, on further exploration this PR doesn’t make much sense; apologies!
Apologies for the previous implementation, it worked more by accident than anything else (it required the existence of a method named the same was as the argument, which happened to be the case in all of my specs…).
This allows the kwargs to be anything, which is still sub-optimal¹, but better than what’s on master at the moment.
¹ ideally, the stringifier would default them to their actual default values – but I failed to find a stable way to do it with the method_source gem; the other idea was to parse
Ripper.sexp
output fed withMethod#source_location
, but that might be more work than it’s worth ;)