Sha256: 379cb966fe5fafe9e7c87afe551531c8439c9375f01070988d92fc9e75c7b25a

Contents?: true

Size: 612 Bytes

Versions: 41

Compression:

Stored size: 612 Bytes

Contents

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

module Pact
  module Matchers
    class BaseDifference

      attr_reader :expected, :actual

      def initialize expected, actual
        @expected = expected
        @actual = actual
      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

41 entries across 41 versions & 2 rubygems

Version Path
pact-support-1.0.1 lib/pact/matchers/base_difference.rb
pact-support-1.0.0 lib/pact/matchers/base_difference.rb
pact-support-0.6.1 lib/pact/matchers/base_difference.rb
pact-support-0.6.0 lib/pact/matchers/base_difference.rb
pact-support-0.5.9 lib/pact/matchers/base_difference.rb
pact-support-0.5.8 lib/pact/matchers/base_difference.rb
pact-support-0.5.7 lib/pact/matchers/base_difference.rb
pact-support-0.5.5 lib/pact/matchers/base_difference.rb
pact-support-0.5.4 lib/pact/matchers/base_difference.rb
pact-support-0.5.3 lib/pact/matchers/base_difference.rb
pact-support-0.5.1 lib/pact/matchers/base_difference.rb
pact-support-0.5.0 lib/pact/matchers/base_difference.rb
pact-support-0.4.4 lib/pact/matchers/base_difference.rb
pact-support-0.4.3 lib/pact/matchers/base_difference.rb
pact-support-0.4.2 lib/pact/matchers/base_difference.rb
pact-support-0.4.1 lib/pact/matchers/base_difference.rb
pact-support-0.4.0 lib/pact/matchers/base_difference.rb
pact-support-0.3.1 lib/pact/matchers/base_difference.rb
pact-support-0.3.0 lib/pact/matchers/base_difference.rb
pact-support-0.2.1 lib/pact/matchers/base_difference.rb