Sha256: 9bc4da0e789618519f00b81034d2caaa05b9b7f1f4d75605af341fab34eed121
Contents?: true
Size: 455 Bytes
Versions: 2
Compression:
Stored size: 455 Bytes
Contents
describe "options tolerance" do before do class Test::Foo extend Dry::Initializer::Mixin option :foo end class Test::Bar extend Dry::Initializer::Mixin end end it "allows unknown options when someone defined" do expect { Test::Foo.new foo: :bar, bar: :baz }.not_to raise_error end it "forbids options when no one defined" do expect { Test::Bar.new bar: :baz }.to raise_error(ArgumentError) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dry-initializer-0.8.1 | spec/options_tolerance_spec.rb |
dry-initializer-0.8.0 | spec/options_tolerance_spec.rb |