Sha256: 81470050cba1a6739fdd729383a5c47c38558f6c32ccf5df73d99a97bccb83ba

Contents?: true

Size: 398 Bytes

Versions: 22

Compression:

Stored size: 398 Bytes

Contents

require 'pact/term'
require 'awesome_print'
require 'pact/matchers'
require 'awesome_print'
require 'rspec'

RSpec::Matchers.define :match_term do |expected|
  include Pact::Matchers

  match do |actual|
    if (difference = diff(expected, actual)).any?
      @message = difference
      false
    else
      true
    end
  end

  failure_message_for_should do | actual |
    @message.ai
  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
pact-1.0.30 lib/pact/provider/matchers.rb
pact-1.0.29 lib/pact/provider/matchers.rb
pact-1.0.28 lib/pact/provider/matchers.rb
pact-1.0.27 lib/pact/provider/matchers.rb
pact-1.0.26 lib/pact/provider/matchers.rb
pact-1.0.25 lib/pact/provider/matchers.rb
pact-1.0.24 lib/pact/provider/matchers.rb
pact-1.0.23 lib/pact/provider/matchers.rb
pact-1.0.22 lib/pact/provider/matchers.rb
pact-1.0.21 lib/pact/provider/matchers.rb
pact-1.0.20 lib/pact/provider/matchers.rb
pact-1.0.19 lib/pact/provider/matchers.rb
pact-1.0.18 lib/pact/provider/matchers.rb
pact-1.0.15 lib/pact/provider/matchers.rb
pact-1.0.13 lib/pact/provider/matchers.rb
pact-1.0.12 lib/pact/provider/matchers.rb
pact-1.0.11 lib/pact/provider/matchers.rb
pact-1.0.10 lib/pact/provider/matchers.rb
pact-1.0.9 lib/pact/provider/matchers.rb
pact-1.0.8 lib/pact/provider/matchers.rb