Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
rcov/ruby/1.8/gems/rspec-expectations-2.5.0/lib/rspec/expectations/extensions/kernel.rb | 52 | 8 | 94.23%
|
62.50%
|
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 Kernel |
2 # :call-seq: |
3 # should(matcher) |
4 # should == expected |
5 # should === expected |
6 # should =~ expected |
7 # |
8 # receiver.should(matcher) |
9 # => Passes if matcher.matches?(receiver) |
10 # |
11 # receiver.should == expected #any value |
12 # => Passes if (receiver == expected) |
13 # |
14 # receiver.should === expected #any value |
15 # => Passes if (receiver === expected) |
16 # |
17 # receiver.should =~ regexp |
18 # => Passes if (receiver =~ regexp) |
19 # |
20 # See RSpec::Matchers for more information about matchers |
21 # |
22 # == Warning |
23 # |
24 # NOTE that this does NOT support receiver.should != expected. |
25 # Instead, use receiver.should_not == expected |
26 def should(matcher=nil, message=nil, &block) |
27 RSpec::Expectations::PositiveExpectationHandler.handle_matcher(self, matcher, message, &block) |
28 end |
29 |
30 # :call-seq: |
31 # should_not(matcher) |
32 # should_not == expected |
33 # should_not === expected |
34 # should_not =~ expected |
35 # |
36 # receiver.should_not(matcher) |
37 # => Passes unless matcher.matches?(receiver) |
38 # |
39 # receiver.should_not == expected |
40 # => Passes unless (receiver == expected) |
41 # |
42 # receiver.should_not === expected |
43 # => Passes unless (receiver === expected) |
44 # |
45 # receiver.should_not =~ regexp |
46 # => Passes unless (receiver =~ regexp) |
47 # |
48 # See RSpec::Matchers for more information about matchers |
49 def should_not(matcher=nil, message=nil, &block) |
50 RSpec::Expectations::NegativeExpectationHandler.handle_matcher(self, matcher, message, &block) |
51 end |
52 end |
Generated on Fri Apr 22 17:22:42 -0700 2011 with rcov 0.9.8