You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I was playing around with the different finder methods in Melomel and I ran into the following issue:
There a methods in Melomel::Bride and Melomel::Cucumber.
But only the methods in Melomel::Bride have an exclamation mark (e.g. find_all!) implementation and an implementation without an exclamation mark (e.g. find_all). So you can't use any methods in Melomel::Cucumber without throwing an error, if Melomel can't find an object.
So I would prefer, when you run your features, that you get: expected: not nil got: nil (RSpec::Expectations::ExpectationNotMetError)
instead of: No object found (Melomel::MelomelError)
What do you think about it? Wouldn't that be nice? ;)
The text was updated successfully, but these errors were encountered:
I think I see what you're saying. Just return nil and let RSpec do the validation? There was some talk about removing the "!" methods. It does seem like the right way to do it. I'm not sure that I have time right now. If you want to fork the code and have it return nils then I'll merge it in as a v0.7.x release.
You're right, that was my point, lets do RSpec do the validation, at least when you check for existance of an object. I try to find some time next week to do it.
Hi,
I was playing around with the different finder methods in Melomel and I ran into the following issue:
There a methods in
Melomel::Bride
andMelomel::Cucumber
.But only the methods in
Melomel::Bride
have an exclamation mark (e.g.find_all!
) implementation and an implementation without an exclamation mark (e.g.find_all
). So you can't use any methods inMelomel::Cucumber
without throwing an error, if Melomel can't find an object.So I would prefer, when you run your features, that you get:
expected: not nil got: nil (RSpec::Expectations::ExpectationNotMetError)
instead of:
No object found (Melomel::MelomelError)
What do you think about it? Wouldn't that be nice? ;)
The text was updated successfully, but these errors were encountered: