Sha256: 14ed69ab3aef130f2d974d791e49a0b6fd1d3ae66db69b40b3b76b30648d40c1
Contents?: true
Size: 780 Bytes
Versions: 4
Compression:
Stored size: 780 Bytes
Contents
require "rspec" 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" || RSpec::Version::STRING == "3.0.0.beta1" 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
warp-1.3.3 | lib/warp/matcher.rb |
warp-1.3.2 | lib/warp/matcher.rb |
warp-1.3.1 | lib/warp/matcher.rb |
warp-1.3.0 | lib/warp/matcher.rb |