Sha256: f90bacc98f13334c1affae603f797bbef4ddd9568769d6fb586f30bf5bcad7e0

Contents?: true

Size: 374 Bytes

Versions: 26

Compression:

Stored size: 374 Bytes

Contents

require "dry-types"

describe "value coercion via dry-types" do
  before do
    module Test::Types
      include Dry::Types.module
    end

    class Test::Foo
      extend Dry::Initializer::Mixin

      param :foo, type: Test::Types::Coercible::String
    end
  end

  subject { Test::Foo.new :foo }

  it "coerces values" do
    expect(subject.foo).to eql "foo"
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
dry-initializer-0.3.3 spec/dry/value_coercion_via_dry_types_spec.rb
dry-initializer-0.3.2 spec/dry/value_coercion_via_dry_types_spec.rb
dry-initializer-0.3.1 spec/dry/value_coercion_via_dry_types_spec.rb
dry-initializer-0.3.0 spec/dry/value_coercion_via_dry_types_spec.rb
dry-initializer-0.2.1 spec/dry/value_coercion_via_dry_types_spec.rb
dry-initializer-0.2.0 spec/dry/value_coercion_via_dry_types_spec.rb