Sha256: ee00a73ee19424c679cbfd8dadf12711e038bad2ccf5ca5815733a0a5cc9b93d
Contents?: true
Size: 444 Bytes
Versions: 1
Compression:
Stored size: 444 Bytes
Contents
describe "shared definition" do subject do class Test::Foo extend Dry::Initializer::Mixin using default: proc { nil } do param :foo option :bar option :baz, default: proc { 0 } end end end it "is applied to params and options" do expect(subject.new.foo).to be_nil expect(subject.new.bar).to be_nil end it "can be reloaded" do expect(subject.new.baz).to eq 0 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dry-initializer-0.7.0 | spec/dry/shared_definitions_spec.rb |