Closed odlp closed 6 years ago
Hey, would definitely be open to a rethink of the testing strategy here!
@odlp I'm wondering--Would you be interested in becoming a collaborator on the project?
I've got quite a bit going on at the moment and not sure that I could give this my fullest attention, but I like the consideration and thought that you've put into your work thus far.
Let me know!
@lpender sure, I'd be interested in helping out!
:+1:
Speaking of tests, the issue blocking the development of feature tests seems to be stale for a while now. @lpender, do you think there is any alternate possibility for the development of feature tests in bummr?
@odlp This is a slow moving one, but I went ahead and added you as a contributor!
Can you email me at lee@lunchtimelabs.io when you have a moment?
Thanks
Whilst making a contribution yesterday I noticed a couple of areas of the test suite that could potentially be improved.
In particular there's quite a bit of stubbing private methods, including the subject under test, which is often considered an antipattern (reference from Sam Phippen's blog - an RSpec core member). Here's one instance of this:
Additionally, by making many of the core
Bummr
classes Singletons this forces the use of#allow_any_instance_of
which is listed under RSpec's 'testing legacy code' section and isn't recommended.Would you be open to PRs to inject dependencies and alter these tests so stubbing the subject under test & global constants can be avoided?
No problem if this isn't of interest - I just wanted to see if I can help improve this handy tool.
The code below is a quick illustration of how this rewrite would look for the
Bummr::Outdated
class.