Skip to content

Commit

Permalink
fix test in several Ruby versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Oct 8, 2024
1 parent 5817613 commit e047d92
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/wrap/task_wrap_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ def abc_implementation(a_extensions: [])

outer_schema = Inter::Compiler.(outer_intermediate, outer_implementation)

assert_invoke Activity.new(outer_schema), seq: "[:b, :c, :a, :b, :c, :c]", start_at: Implementing.method(:b)
start_task = Implementing.method(:b) # this used to work before `map.compare_by_identity`.
start_task = abc_implementation[:b].circuit_task # it has to be the very same object

assert_invoke Activity.new(outer_schema), seq: "[:b, :c, :a, :b, :c, :c]", start_at: start_task
end

def change_start_task(wrap_ctx, original_args)
Expand All @@ -148,7 +151,7 @@ def change_start_task(wrap_ctx, original_args)
circuit_options = circuit_options.merge(start_task: ctx[:start_at])
original_args = [[ctx, flow_options], circuit_options]

return wrap_ctx, original_args # yay to mutable state. not.
return wrap_ctx, original_args
end

it "deprecates Pipeline.method(:insert) and friends" do
Expand Down

0 comments on commit e047d92

Please sign in to comment.