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.7 lib/pact/provider/matchers.rb
pact-1.0.6 lib/pact/provider/matchers.rb