diff --git a/lib/pact/term.rb b/lib/pact/term.rb index 67e241e..388dbd9 100644 --- a/lib/pact/term.rb +++ b/lib/pact/term.rb @@ -80,6 +80,5 @@ def self.unpack_regexps_from_hash source destination[key] = unpack_regexps source[key] end end - end end diff --git a/spec/lib/pact/matchers/matchers_spec.rb b/spec/lib/pact/matchers/matchers_spec.rb index 79d4dc0..9725452 100644 --- a/spec/lib/pact/matchers/matchers_spec.rb +++ b/spec/lib/pact/matchers/matchers_spec.rb @@ -531,6 +531,7 @@ module Pact::Matchers context "where an array is expected, but a hash is found" do subject { {:a => :b} } + let(:actual) { [4, 5, 6] } it 'includes this in the diff' do @@ -540,6 +541,7 @@ module Pact::Matchers context "where a hash is expected, but array is found" do subject { [4,5,6] } + let(:actual) { {:a => :b} } it 'includes this in the diff' do @@ -549,6 +551,7 @@ module Pact::Matchers context "when two different arrays are found" do subject { [4,5,6] } + let(:actual) { [4, 6, 7] } let(:difference) { [NoDiffAtIndex.new, Difference.new(5, 6), Difference.new(6, 7)] } @@ -559,6 +562,7 @@ module Pact::Matchers context "when an array that matches the Pact::Term is found" do subject { [Pact::Term.new(:matcher => /4/, :generate => '4'),"5","6"] } + let(:actual) { ["4", "5", "6"] } it 'includes this in the diff' do diff --git a/spec/lib/pact/term_spec.rb b/spec/lib/pact/term_spec.rb index 56e3a6a..28b697f 100644 --- a/spec/lib/pact/term_spec.rb +++ b/spec/lib/pact/term_spec.rb @@ -82,8 +82,6 @@ module Pact it "returns a structure with the Pact::Terms replaced by their regexps" do expect(Term.unpack_regexps(body)).to eq expected end - end - end end