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
Sinject::Container#register will check that a class parameter has been provided and raise an error if it is absent. However, it does not check that the class is non-nil.
Sinject::DependencyRegistrationClassNotSpecifiedException or similar to be raised.
Actual:
Nothing is raised.
container.get(:foo) raises NoMethodError
This is similar to #14, but arguably more serious as nil cannot be a valid class and any errors will be raised after the fact.
The text was updated successfully, but these errors were encountered:
KevinBrowne
changed the title
Sinject::Container#register allows key parameter to be nil
Sinject::Container#register allows class parameter to be nil
Feb 21, 2024
Sinject::Container#register
will check that aclass
parameter has been provided and raise an error if it is absent. However, it does not check that the class is non-nil.Steps to reproduce:
Expected:
Sinject::DependencyRegistrationClassNotSpecifiedException
or similar to be raised.Actual:
Nothing is raised.
container.get(:foo)
raisesNoMethodError
This is similar to #14, but arguably more serious as
nil
cannot be a valid class and any errors will be raised after the fact.The text was updated successfully, but these errors were encountered: