Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
rcov/ruby/1.8/gems/rspec-expectations-2.5.0/lib/rspec/expectations/deprecation.rb | 36 | 25 | 16.67%
|
8.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 |
3 # This is defined in rspec-core, but we can't assume it's loaded since |
4 # rspec-expectations should be usable w/o rspec-core. |
5 unless respond_to?(:deprecate) |
6 class << self |
7 def deprecate(method, alternate_method=nil, version=nil) |
8 version_string = version ? "rspec-#{version}" : "a future version of RSpec" |
9 |
10 message = <<-NOTICE |
11 |
12 ***************************************************************** |
13 DEPRECATION WARNING: you are using deprecated behaviour that will |
14 be removed from #{version_string}. |
15 |
16 #{caller(0)[2]} |
17 |
18 * #{method} is deprecated. |
19 NOTICE |
20 if alternate_method |
21 message << <<-ADDITIONAL |
22 * please use #{alternate_method} instead. |
23 ADDITIONAL |
24 end |
25 |
26 message << "*****************************************************************" |
27 warn_deprecation(message) |
28 end |
29 |
30 def warn_deprecation(message) |
31 send :warn, message |
32 end |
33 end |
34 end |
35 end |
36 |
Generated on Fri Apr 22 17:22:41 -0700 2011 with rcov 0.9.8