Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
rcov/ruby/1.8/gems/rspec-expectations-2.5.0/lib/rspec/matchers/eql.rb | 45 | 25 | 33.33%
|
12.00%
|
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 eql(expected) |
5 # should_not eql(expected) |
6 # |
7 # Passes if actual and expected are of equal value, but not necessarily the same object. |
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 eql(5) |
14 # 5.should_not eql(3) |
15 def eql(expected) |
16 Matcher.new :eql, expected do |_expected_| |
17 |
18 diffable |
19 |
20 match do |actual| |
21 actual.eql?(_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 eql?) |
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 eql?) |
40 MESSAGE |
41 end |
42 end |
43 end |
44 end |
45 end |
Generated on Fri Apr 22 17:22:41 -0700 2011 with rcov 0.9.8