Geminstaller C0 Coverage Information - RCov

/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/extensions/instance_exec.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
/Users/woolley/.rvm/gems/ruby-1.8.7-p174@geminstaller/gems/rspec-1.3.0/lib/spec/extensions/instance_exec.rb 31 24
12.90%
16.67%

Key

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.

Coverage Details

1 module Spec
2   module Matchers
3     module InstanceExec
4       unless respond_to?(:instance_exec)
5         # based on Bounded Spec InstanceExec (Mauricio Fernandez)
6         # http://eigenclass.org/hiki/bounded+space+instance_exec
7         # - uses singleton_class of matcher instead of global
8         #   InstanceExecHelper module
9         # - this keeps it scoped to this class only, which is the
10         #   only place we need it
11         # - only necessary for ruby 1.8.6
12         def instance_exec(*args, &block)
13           singleton_class = (class << self; self; end)
14           begin
15             orig_critical, Thread.critical = Thread.critical, true
16             n = 0
17             n += 1 while respond_to?(method_name="__instance_exec#{n}")
18             singleton_class.module_eval{ define_method(:__instance_exec, &block) }
19           ensure
20             Thread.critical = orig_critical
21           end
22           begin
23             return send(:__instance_exec, *args)
24           ensure
25             singleton_class.module_eval{ remove_method(:__instance_exec) } rescue nil
26           end
27         end
28       end
29     end
30   end
31 end

Generated on Mon May 10 23:40:27 -0700 2010 with rcov 0.9.8