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.
Steps to reproduce:
require 'sinject'
container = Sinject::Container.new(false)
container.register(key: :foo, class: nil)
Expected:
Sinject::DependencyRegistrationClassNotSpecifiedException or similar to be raised.
Actual:
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.
Sinject::Container#registerwill check that aclassparameter 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::DependencyRegistrationClassNotSpecifiedExceptionor similar to be raised.Actual:
Nothing is raised.
container.get(:foo)raisesNoMethodErrorThis is similar to #14, but arguably more serious as
nilcannot be a valid class and any errors will be raised after the fact.