spec/unit/step_adapters/try_spec.rb in dry-transaction-0.11.2 vs spec/unit/step_adapters/try_spec.rb in dry-transaction-0.12.0

- old
+ new

@@ -39,12 +39,12 @@ expect(subject.(operation, options, [1234])).to be_a_failure end it "returns the raised error as output" do result = subject.(operation, options, [1234]) - expect(result.left).to be_a Test::NotValidError - expect(result.left.message).to eql("not a string") + expect(result.failure).to be_a Test::NotValidError + expect(result.failure.message).to eql("not a string") end context "when using the :raise option" do let(:options) { { @@ -57,11 +57,11 @@ expect(subject.(operation, options, [1234])).to be_a_failure end it "returns the error specified by :raise as output" do result = subject.(operation, options, [1234]) - expect(result.left).to be_a Test::BetterNamingError - expect(result.left.message).to eql("not a string") + expect(result.failure).to be_a Test::BetterNamingError + expect(result.failure.message).to eql("not a string") end end end context "when the error was NOT raised" do