We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fba761e commit ae5fd2fCopy full SHA for ae5fd2f
spec/definition_spec.rb
@@ -16,6 +16,22 @@ class Test::Foo
16
option :bar
17
end
18
19
+
20
+ it "preservers definition params" do
21
+ params = Test::Foo.dry_initializer.params.map do |definition|
22
+ [definition.source, definition.options]
23
+ end
24
25
+ expect(params).to eq [[:foo, { as: :foo, reader: :public }]]
26
27
28
+ it "preservers definition options" do
29
+ options = Test::Foo.dry_initializer.options.map do |definition|
30
31
32
33
+ expect(options).to eq [[:bar, { as: :bar, reader: :public }]]
34
35
36
37
it_behaves_like :initializer, "extend Dry::Initializer" do
0 commit comments