Sha256: 0bbd350521436aa02f8b6693ecfad71ea4187ac4c9f6ac4581f4ef50d21a3e82

Contents?: true

Size: 720 Bytes

Versions: 1

Compression:

Stored size: 720 Bytes

Contents

module Warp
  class Matcher
    # Composable matchers are new in RSpec 3.
    # Define basic helpers in their absence.
    if defined?(RSpec::Matchers::Composable)
      include RSpec::Matchers::Composable
    else
      def description_of(object)
        object.inspect
      end

      def values_match?(expected, actual)
        expected === actual || actual == expected
      end
    end

    # RSpec 2 and 3 have different methods
    # that they call on matcher to get the
    # failure messages.
    if RSpec::Version::STRING[0] == "2"
      def failure_message_for_should
        failure_message
      end

      def failure_message_for_should_not
        failure_message_when_negated
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
warp-1.1.0 lib/warp/matcher.rb