Sha256: 5757923f8cc5f153e0febb1b554e2b719539434a08eec9b8e5c94079c377d127
Contents?: true
Size: 599 Bytes
Versions: 7
Compression:
Stored size: 599 Bytes
Contents
describe "options tolerance" do before do class Test::Foo extend Dry::Initializer::Mixin end class Test::Bar < Test::Foo tolerant_to_unknown_options end class Test::Baz < Test::Bar intolerant_to_unknown_options end end it "is strict by default" do expect { Test::Foo.new foo: :bar }.to raise_error(ArgumentError) end it "allows unknown options when switched on" do expect { Test::Bar.new foo: :bar }.not_to raise_error end it "can be switched off" do expect { Test::Baz.new foo: :bar }.to raise_error(ArgumentError) end end
Version data entries
7 entries across 7 versions & 1 rubygems