assaf / vanity

Experiment Driven Development for Ruby
http://vanity.labnotes.org
MIT License
1.55k stars 269 forks source link

Deprecate calling #ab_seen with alternative instance #317

Closed urbanautomaton closed 7 years ago

urbanautomaton commented 7 years ago

As noted in #309, the #ab_seen adapter method currently takes an instance of Alternative, where all other adapter methods take an alternative id.

Since this has the potential to cause confusion, I thought it might be best to support both calling styles, logging a deprecation notice if the method is called with an Alternative instance, but still returning the correct response. We can then remove support for the old method signature after a respectful period of silence. :-)

(I've also silenced the deprecation warnings emitted by another test, hope that's okay.)

urbanautomaton commented 7 years ago

Thanks for the feedback - I've restored the descriptive parameter names, and used short names for the inner block parameters to avoid shadowing but keep things descriptive.

Please don't apologise for the review time - really appreciate you looking at this series of PRs lately. Hope you had a great holiday. :)