Skip to content

Commit

Permalink
refactor: fix typo in interaction_mismatch.rb from candiate_diffs to …
Browse files Browse the repository at this point in the history
…candidate_diffs (#144)
  • Loading branch information
Aerowiel authored Jun 13, 2023
1 parent 65bf502 commit c6fed46
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/pact/mock_service/interactions/interaction_mismatch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ class InteractionMismatch
def initialize candidate_interactions, actual_request
@candidate_interactions = candidate_interactions
@actual_request = actual_request
@candiate_diffs = candidate_interactions.collect{ | candidate_interaction| CandidateDiff.new(candidate_interaction, actual_request)}
@candidate_diffs = candidate_interactions.collect{ | candidate_interaction| CandidateDiff.new(candidate_interaction, actual_request)}
end

def to_hash
candiate_diffs.collect(&:to_hash)
candidate_diffs.collect(&:to_hash)
end

def to_s
candiate_diffs.collect(&:to_s).join("\n")
candidate_diffs.collect(&:to_s).join("\n")
end

def short_summary
mismatched_attributes = candiate_diffs.collect(&:mismatched_attributes).flatten.uniq.join(", ").reverse.sub(",", "dna ").reverse #OMG what a hack!
mismatched_attributes = candidate_diffs.collect(&:mismatched_attributes).flatten.uniq.join(", ").reverse.sub(",", "dna ").reverse #OMG what a hack!
actual_request.method_and_path + " (request #{mismatched_attributes} did not match)"
end

private

attr_accessor :candiate_diffs
attr_accessor :candidate_diffs

class CandidateDiff

Expand Down

0 comments on commit c6fed46

Please sign in to comment.