Skip to content

Commit 31008c6

Browse files
committed
Lint
1 parent 9d20a11 commit 31008c6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/typed_operation/context_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

test/typed_operation/integration_example_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)