test/fast_track_test.rb in trailblazer-operation-0.2.5 vs test/fast_track_test.rb in trailblazer-operation-0.3.0

- old
+ new

@@ -76,11 +76,11 @@ step ->(options, *) { options["y"] = true } failure ->(options, *) { options["a"] = true } end # without proper configuration, emitting a FastTrack signal is illegal. - it { assert_raises(Trailblazer::Circuit::IllegalOutputSignalError) { Create.().inspect("x", "y", "a").must_equal %{<Result:false [true, nil, nil] >} } } + it { assert_raises(Trailblazer::Circuit::IllegalSignalError) { Create.().inspect("x", "y", "a").must_equal %{<Result:false [true, nil, nil] >} } } class Update < Trailblazer::Operation step ->(options, *) { options["x"] = true; Railway.fail_fast! }, fast_track: true step ->(options, *) { options["y"] = true } failure ->(options, *) { options["a"] = true } @@ -124,11 +124,11 @@ end describe "Nested, fast_track: true and all its outputs given" do let(:update) do Class.new(Trailblazer::Operation) do - step task: Trailblazer::Operation::Callable( Edit, call: :__call__ ), id: "Callable/", + step task: Trailblazer::Operation::Callable( Edit, call: :call_with_circuit_interface ), id: "Callable/", outputs: Edit.outputs , fast_track: true step :b fail :f @@ -149,11 +149,11 @@ 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::Operation::Callable( Edit, call: :__call__ ), id: "Callable/", + step task: Trailblazer::Operation::Callable( Edit, call: :call_with_circuit_interface ), id: "Callable/", outputs: Edit.outputs # all outputs given means it "works" step :b fail :f end end @@ -171,10 +171,10 @@ 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::Operation::Callable( Edit, call: :__call__ ), id: "Callable/", + step({task: Trailblazer::Operation::Callable( Edit, call: :call_with_circuit_interface ), 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