Sha256: c9ae1a7f24bff67541bf9a5a70f266c5900bc1b00f4b0ea6c531077f4f361d23

Contents?: true

Size: 286 Bytes

Versions: 9

Compression:

Stored size: 286 Bytes

Contents

describe "missed default values" do
  subject do
    class Test::Foo
      extend Dry::Initializer

      param :foo, default:  proc { :FOO }
      param :bar, required: true
    end
  end

  it "raises SyntaxError" do
    expect { subject }.to raise_error SyntaxError, /bar/
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dry-initializer-3.0.2 spec/missed_default_spec.rb
dry-initializer-3.0.1 spec/missed_default_spec.rb
dry-initializer-3.0.0 spec/missed_default_spec.rb
dry-initializer-2.5.0 spec/missed_default_spec.rb
dry-initializer-2.4.0 spec/missed_default_spec.rb
dry-initializer-2.3.0 spec/missed_default_spec.rb
dry-initializer-2.2.0 spec/missed_default_spec.rb
dry-initializer-2.1.0 spec/missed_default_spec.rb
dry-initializer-2.0.0 spec/missed_default_spec.rb