Skip to content

Commit 56f1ee4

Browse files
committed
Not Ruby 2.7 specific
It is too keep mutant on point. Added missing silence_warnings too.
1 parent 18161a7 commit 56f1ee4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

aggregate_root/spec/aggregate_root_spec.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def apply_order_expired(_event)
8787
expect { order.apply(spanish_inquisition) }.not_to raise_error
8888
end
8989

90-
it "include with_strategy should warn about depracations" do
90+
it "include with_strategy should warn about deprecations" do
9191
expect {
9292
Class.new { include AggregateRoot.with_strategy(-> { AggregateRoot::DefaultApplyStrategy.new(strict: false) }) }
9393
}.to output(<<~EOW).to_stderr
@@ -139,12 +139,9 @@ def custom_expired(_event)
139139
expect(order.status).to eq :created
140140
end
141141

142-
it "ruby 2.7 compatibility" do
143-
klass = Class.new { include AggregateRoot.with_default_apply_strategy }
142+
it "included modules" do
143+
klass = silence_warnings { Class.new { include AggregateRoot.with_default_apply_strategy } }
144144

145-
# This is just a way to ensure that the AggregateMethods was included on
146-
# the klass directly, not that it was an include to the anonymous module.
147-
# This test can be removed when ruby 2.7 will be no longer supported.
148145
expect(klass.included_modules[0]).to eq(AggregateRoot::AggregateMethods)
149146
end
150147

0 commit comments

Comments
 (0)