Sha256: 0a643c14315a5e9cc989eb8b14ec63f5a2b2984073b5087d53bfc755a6ec2a45

Contents?: true

Size: 404 Bytes

Versions: 1

Compression:

Stored size: 404 Bytes

Contents

describe "base example" do
  before do
    class Test::Foo
      extend Dry::Initializer

      param  :foo
      param  :bar
      option :baz
      option :qux
    end
  end

  it "instantiates attributes" do
    subject = Test::Foo.new(1, 2, baz: 3, qux: 4)

    expect(subject.foo).to eql 1
    expect(subject.bar).to eql 2
    expect(subject.baz).to eql 3
    expect(subject.qux).to eql 4
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dry-initializer-0.0.1 spec/dry/base_spec.rb