lib/dry/transaction/result_matcher.rb in dry-transaction-0.8.0 vs lib/dry/transaction/result_matcher.rb in dry-transaction-0.9.0

- old
+ new

@@ -1,22 +1,22 @@ require "dry-matcher" module Dry - module Transaction + class Transaction ResultMatcher = Dry::Matcher.new( success: Dry::Matcher::Case.new( match: -> result { result.right? }, - resolve: -> result { result.value }, + resolve: -> result { result.value } ), failure: Dry::Matcher::Case.new( match: -> result, step_name = nil { if step_name - result.left? && result.value.step_name == step_name + result.left? && result.value.step.step_name == step_name else result.left? end }, - resolve: -> result { result.value.value }, + resolve: -> result { result.value.value } ) ) end end