Sha256: 62eae087956d8aa7eb63df79dcb66733b445eabcaf8bab29b57669216c70d7e1

Contents?: true

Size: 691 Bytes

Versions: 80

Compression:

Stored size: 691 Bytes

Contents

require 'pact/matchers/expected_type'
require 'pact/matchers/actual_type'

module Pact
  module Matchers
    class BaseDifference

      attr_reader :expected, :actual, :message
      attr_writer :message

      def initialize expected, actual, message = nil
        @expected = expected
        @actual = actual
        @message = message
      end

      def any?
        true
      end

      def empty?
        false
      end

      def to_json options = {}
        as_json.to_json(options)
      end

      def to_s
        as_json.to_s
      end

      def == other
        other.class == self.class && other.expected == expected && other.actual == actual
      end

    end
  end
end

Version data entries

80 entries across 80 versions & 2 rubygems

Version Path
pact-support-1.21.2 lib/pact/matchers/base_difference.rb
pact-support-1.21.1 lib/pact/matchers/base_difference.rb
pact-support-1.21.0 lib/pact/matchers/base_difference.rb
pact-support-1.20.2 lib/pact/matchers/base_difference.rb
pact-support-1.20.1 lib/pact/matchers/base_difference.rb
pact-support-1.20.0 lib/pact/matchers/base_difference.rb
pact-support-1.19.0 lib/pact/matchers/base_difference.rb
pact-support-1.18.1 lib/pact/matchers/base_difference.rb
pact-support-1.18.0 lib/pact/matchers/base_difference.rb
hs-pact-support-1.17.1 lib/pact/matchers/base_difference.rb
pact-support-1.17.0 lib/pact/matchers/base_difference.rb
pact-support-1.16.10 lib/pact/matchers/base_difference.rb
pact-support-1.16.9 lib/pact/matchers/base_difference.rb
pact-support-1.16.8 lib/pact/matchers/base_difference.rb
pact-support-1.16.7 lib/pact/matchers/base_difference.rb
pact-support-1.16.6 lib/pact/matchers/base_difference.rb
pact-support-1.16.5 lib/pact/matchers/base_difference.rb
pact-support-1.16.4 lib/pact/matchers/base_difference.rb
pact-support-1.16.3 lib/pact/matchers/base_difference.rb
pact-support-1.16.2 lib/pact/matchers/base_difference.rb