Sha256: efd67aa6d33c1c44057fc4bb15bee125203eabdac5a0d86487e7a69542099d30

Contents?: true

Size: 382 Bytes

Versions: 9

Compression:

Stored size: 382 Bytes

Contents

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

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

9 entries across 9 versions & 1 rubygems

Version Path
pact-1.0.5 lib/pact/provider/matchers.rb
pact-1.0.4 lib/pact/provider/matchers.rb
pact-1.0.3 lib/pact/provider/matchers.rb
pact-1.0.2 lib/pact/provider/matchers.rb
pact-1.0.1 lib/pact/provider/matchers.rb
pact-1.0.0 lib/pact/provider/matchers.rb
pact-0.1.37 lib/pact/producer/matchers.rb
pact-0.1.35 lib/pact/producer/matchers.rb
pact-0.1.28 lib/pact/producer/matchers.rb