File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -263,11 +263,11 @@ def test_respond_to
263263 def test_can_be_used_as_kwargs_splat
264264 ctx = TypedOperation ::Context . new ( name : "Alice" , age : 30 )
265265
266- def receiver ( name :, age :)
266+ receiver = -> ( name :, age :) do
267267 "#{ name } is #{ age } "
268268 end
269269
270- result = receiver ( **ctx . to_h )
270+ result = receiver . call ( **ctx . to_h )
271271
272272 assert_equal "Alice is 30" , result
273273 end
Original file line number Diff line number Diff line change @@ -718,7 +718,8 @@ def test_transform_in_middle_of_chain
718718 subtotal : ctx [ :subtotal ] * 1.1 # Apply 10% markup
719719 )
720720 end
721- . then ( CalculateShipping )
721+
722+ chain = chain . then ( CalculateShipping )
722723 . transform { |ctx | ctx . merge ( priority_shipping : ctx [ :vip_customer ] && ctx [ :subtotal ] > 50 ) }
723724 . then ( ApplyDiscount )
724725
You can’t perform that action at this time.
0 commit comments