Sha256: e34ae2cc19a935a6571436ad47c8e3698aa80845093ec12cf447ed570fc76b5b
Contents?: true
Size: 882 Bytes
Versions: 1
Compression:
Stored size: 882 Bytes
Contents
describe "repetitive definitions" do context "of params" do subject do class Test::Foo extend Dry::Initializer param :foo param :bar param :foo end end it "raise SyntaxError" do expect { subject }.to raise_error SyntaxError, /foo/ end end context "of options" do subject do class Test::Foo extend Dry::Initializer option :foo option :bar option :foo end end it "raise SyntaxError" do expect { subject }.to raise_error SyntaxError, /foo/ end end context "of param and option" do subject do class Test::Foo extend Dry::Initializer param :foo option :bar option :foo end end it "raise SyntaxError" do expect { subject }.to raise_error SyntaxError, /foo/ end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dry-initializer-0.0.1 | spec/dry/repetitive_definitions_spec.rb |