Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
rcov/ruby/1.8/gems/rspec-expectations-2.5.0/lib/rspec/matchers/eq.rb | 50 | 28 | 32.00%
|
10.71%
|
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 RSpec |
2 module Matchers |
3 # :call-seq: |
4 # should eq(expected) |
5 # should_not eq(expected) |
6 # |
7 # Passes if actual == expected. |
8 # |
9 # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more information about equality in Ruby. |
10 # |
11 # == Examples |
12 # |
13 # 5.should eq(5) |
14 # 5.should_not eq(3) |
15 def eq(expected) |
16 Matcher.new :eq, expected do |_expected_| |
17 |
18 diffable |
19 |
20 match do |actual| |
21 actual == _expected_ |
22 end |
23 |
24 failure_message_for_should do |actual| |
25 <<-MESSAGE |
26 |
27 expected #{_expected_.inspect} |
28 got #{actual.inspect} |
29 |
30 (compared using ==) |
31 MESSAGE |
32 end |
33 |
34 failure_message_for_should_not do |actual| |
35 <<-MESSAGE |
36 |
37 expected #{actual.inspect} not to equal #{_expected_.inspect} |
38 |
39 (compared using ==) |
40 MESSAGE |
41 end |
42 |
43 description do |
44 "== #{_expected_}" |
45 end |
46 end |
47 end |
48 end |
49 end |
50 |
Generated on Fri Apr 22 17:22:41 -0700 2011 with rcov 0.9.8