test/fast_track_test.rb in trailblazer-operation-0.2.2 vs test/fast_track_test.rb in trailblazer-operation-0.2.3

- old
+ new

@@ -124,12 +124,12 @@ end describe "Nested, fast_track: true and all its outputs given" do let(:update) do Class.new(Trailblazer::Operation) do - step task: Trailblazer::Activity::Subprocess( Edit, call: :__call__ ), id: "Subprocess/", - plus_poles: Trailblazer::Activity::Magnetic::DSL::PlusPoles::from_outputs( Edit.outputs ), + step task: Trailblazer::Operation::Callable( Edit, call: :__call__ ), id: "Callable/", + outputs: Edit.outputs , fast_track: true step :b fail :f include Steps @@ -149,12 +149,12 @@ describe "Nested, no :fast_track option but all its outputs given" do let(:update) do Class.new(Trailblazer::Operation) do include Steps - step task: Trailblazer::Activity::Subprocess( Edit, call: :__call__ ), id: "Subprocess/", - plus_poles: Trailblazer::Activity::Magnetic::DSL::PlusPoles::from_outputs( Edit.outputs ) # all outputs given means it "works" + step task: Trailblazer::Operation::Callable( Edit, call: :__call__ ), id: "Callable/", + outputs: Edit.outputs # all outputs given means it "works" step :b fail :f end end @@ -171,12 +171,12 @@ describe "2.0 behavior: no :fast_track option, all outputs given, but we rewire fast_track" do let(:update) do Class.new(Trailblazer::Operation) do include Steps - step({task: Trailblazer::Activity::Subprocess( Edit, call: :__call__ ), id: "Subprocess/", - plus_poles: Trailblazer::Activity::Magnetic::DSL::PlusPoles::from_outputs( Edit.outputs )}, - {Output(:pass_fast) => :success, Output(:fail_fast) => :failure} )# manually rewire the fast-track outputs to "conventional" railway ends. + step({task: Trailblazer::Operation::Callable( Edit, call: :__call__ ), id: "Callable/", + outputs: Edit.outputs }, + {Output(:pass_fast) => Track(:success), Output(:fail_fast) => Track(:failure)} )# manually rewire the fast-track outputs to "conventional" railway ends. step :b fail :f end end