C0 code coverage information

Generated on Mon Aug 13 01:18:53 -0400 2007 with rcov 0.8.0


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.
Name Total lines Lines of code Total coverage Code coverage
/Users/david/projects/ruby/rspec/trunk/RSpec.tmbundle/Support/lib/spec_mate.rb 50 42
100.0% 
100.0% 
 1 # This is based on Florian Weber's TDDMate
 2 require 'rubygems'
 3 
 4 rspec_rails_plugin = File.join(ENV['TM_PROJECT_DIRECTORY'],'vendor','plugins','rspec','lib')
 5 if File.directory?(rspec_rails_plugin)
 6   $LOAD_PATH.unshift(rspec_rails_plugin)
 7 elsif ENV['TM_RSPEC_HOME']
 8   rspec_lib = File.join(ENV['TM_RSPEC_HOME'], 'lib')
 9   raise "TM_RSPEC_HOME points to a bad location: #{ENV['TM_RSPEC_HOME']}" unless File.directory?(rspec_lib)
10   $LOAD_PATH.unshift(rspec_lib)
11 end
12 
13 require 'spec'
14 require File.dirname(__FILE__) + '/text_mate_formatter'
15 
16 class SpecMate
17   def run_files(stdout, options={})
18     files = ENV['TM_SELECTED_FILES'].split(" ").map{|p| p[1..-2]}
19     options.merge!({:files => files})
20     run(stdout, options)
21   end
22   
23   def run_file(stdout, options={})
24     options.merge!({:files => [single_file]})
25     run(stdout, options)
26   end
27 
28   def run_focussed(stdout, options={})
29     options.merge!({:files => [single_file], :line => ENV['TM_LINE_NUMBER']})
30     run(stdout, options)
31   end
32 
33   def single_file
34     ENV['TM_FILEPATH'][ENV['TM_PROJECT_DIRECTORY'].length+1..-1]
35   end
36   
37   def run(stdout, options)
38     argv = options[:files].dup
39     argv << '--format'
40     argv << 'Spec::Runner::Formatter::TextMateFormatter'
41     if options[:line]
42       argv << '--line'
43       argv << options[:line]
44     end
45     argv += ENV['TM_RSPEC_OPTS'].split(" ") if ENV['TM_RSPEC_OPTS']
46     Dir.chdir(ENV['TM_PROJECT_DIRECTORY']) do
47       ::Spec::Runner::CommandLine.run(argv, STDERR, stdout, false, true)
48     end
49   end
50 end

Generated using the rcov code coverage analysis tool for Ruby version 0.8.0.

Valid XHTML 1.0! Valid CSS!