C0 code coverage information

Generated on Sun May 10 11:15:58 +0100 2009 with rcov 0.8.2.1


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
features/step_definitions/webrat_steps.rb 134 88
62.7%  
43.2%  
  1 require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
  2 
  3 # Commonly used webrat steps
  4 # http://github.com/brynary/webrat
  5 
  6 When /^I go to (.+)$/ do |page_name|
  7   visit path_to(page_name)
  8 end
  9 
 10 When /^I press "(.*)"$/ do |button|
 11 begin  
 12     click_button(button)
 13 rescue Spec::Expectations::ExpectationNotMetError
 14   save_and_open_page
 15   raise
 16 end
 17 end
 18 
 19 When /^I follow "(.*)"$/ do |link|
 20 begin  
 21   click_link(link)
 22 rescue Spec::Expectations::ExpectationNotMetError
 23   save_and_open_page
 24   raise
 25 end  
 26 end
 27 
 28 When /^I fill in "(.*)" with "(.*)"$/ do |field, value|
 29 begin  
 30   fill_in(field, :with => value) 
 31 rescue Spec::Expectations::ExpectationNotMetError
 32   save_and_open_page
 33   raise
 34 end  
 35 end
 36 
 37 When /^I select "(.*)" from "(.*)"$/ do |value, field|
 38 begin  
 39   select(value, :from => field) 
 40 rescue Spec::Expectations::ExpectationNotMetError
 41   save_and_open_page
 42   raise
 43 end  
 44 end
 45 
 46 # Use this step in conjunction with Rail's datetime_select helper. For example:
 47 # When I select "December 25, 2008 10:00" as the date and time 
 48 When /^I select "(.*)" as the date and time$/ do |time|
 49   select_datetime(time)
 50 end
 51 
 52 And /I view the page in a web browser/ do
 53   save_and_open_page
 54 end
 55 
 56 
 57 # Use this step when using multiple datetime_select helpers on a page or 
 58 # you want to specify which datetime to select. Given the following view:
 59 #   <%= f.label :preferred %><br />
 60 #   <%= f.datetime_select :preferred %>
 61 #   <%= f.label :alternative %><br />
 62 #   <%= f.datetime_select :alternative %>
 63 # The following steps would fill out the form:
 64 # When I select "November 23, 2004 11:20" as the "Preferred" data and time
 65 # And I select "November 25, 2004 10:30" as the "Alternative" data and time
 66 When /^I select "(.*)" as the "(.*)" date and time$/ do |datetime, datetime_label|
 67   select_datetime(datetime, :from => datetime_label)
 68 end
 69 
 70 # Use this step in conjuction with Rail's time_select helper. For example:
 71 # When I select "2:20PM" as the time
 72 # Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
 73 # will convert the 2:20PM to 14:20 and then select it. 
 74 When /^I select "(.*)" as the time$/ do |time|
 75   select_time(time)
 76 end
 77 
 78 # Use this step when using multiple time_select helpers on a page or you want to
 79 # specify the name of the time on the form.  For example:
 80 # When I select "7:30AM" as the "Gym" time
 81 When /^I select "(.*)" as the "(.*)" time$/ do |time, time_label|
 82   select_time(time, :from => time_label)
 83 end
 84 
 85 # Use this step in conjuction with Rail's date_select helper.  For example:
 86 # When I select "February 20, 1981" as the date
 87 When /^I select "(.*)" as the date$/ do |date|
 88   select_date(date)
 89 end
 90 
 91 # Use this step when using multiple date_select helpers on one page or
 92 # you want to specify the name of the date on the form. For example:
 93 # When I select "April 26, 1982" as the "Date of Birth" date
 94 When /^I select "(.*)" as the "(.*)" date$/ do |date, date_label|
 95   select_date(date, :from => date_label)
 96 end
 97 
 98 When /^I check "(.*)"$/ do |field|
 99   check(field) 
100 end
101 
102 When /^I uncheck "(.*)"$/ do |field|
103   uncheck(field) 
104 end
105 
106 When /^I choose "(.*)"$/ do |field|
107   choose(field)
108 end
109 
110 When /^I attach the file at "(.*)" to "(.*)" $/ do |path, field|
111   attach_file(field, path)
112 end
113 
114 Then /^I should see "(.*)"$/ do |text|
115 begin  
116   response.body.should =~ /#{text}/m
117 rescue Spec::Expectations::ExpectationNotMetError
118   save_and_open_page
119   raise
120 end  
121 end
122 
123 Then /^I should not see "(.*)"$/ do |text|
124 begin
125   response.body.should_not =~ /#{text}/m
126 rescue Spec::Expectations::ExpectationNotMetError
127   save_and_open_page
128   raise
129 end  
130 end
131 
132 Then /^the "(.*)" checkbox should be checked$/ do |label|
133   field_labeled(label).should be_checked
134 end

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

Valid XHTML 1.0! Valid CSS!