C0 code coverage information
Generated on Mon Aug 13 01:18:54 -0400 2007 with rcov 0.8.0
Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
1 module Spec
2 module Matchers
3
4 class Equal #:nodoc:
5 def initialize(expected)
6 @expected = expected
7 end
8
9 def matches?(actual)
10 @actual = actual
11 @actual.equal?(@expected)
12 end
13
14 def failure_message
15 return "expected #{@expected.inspect}, got #{@actual.inspect} (using .equal?)", @expected, @actual
16 end
17
18 def negative_failure_message
19 return "expected #{@actual.inspect} not to equal #{@expected.inspect} (using .equal?)", @expected, @actual
20 end
21
22 def description
23 "equal #{@expected.inspect}"
24 end
25 end
26
27 # :call-seq:
28 # should equal(expected)
29 # should_not equal(expected)
30 #
31 # Passes if actual and expected are the same object (object identity).
32 #
33 # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby.
34 #
35 # == Examples
36 #
37 # 5.should equal(5) #Fixnums are equal
38 # "5".should_not equal("5") #Strings that look the same are not the same object
39 def equal(expected)
40 Matchers::Equal.new(expected)
41 end
42 end
43 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.0.