Rcov C0 Coverage Information - RCov

app/helpers/users_helper.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
app/helpers/users_helper.rb 34 29
20.59%
10.34%

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 UsersHelper
2 
3   # Construct table rows for multiple users
4   def construct_table_rows(users)
5     result = {}
6     users.each do |user|
7       result[user.id] = construct_table_row(user)
8     end
9     return result
10   end
11 
12   # Construct a single table row
13   def construct_table_row(user)
14     result = {}
15     result[:id] = user.id
16     result[:user_name] = CGI.escapeHTML(user.user_name)
17     result[:first_name] = CGI.escapeHTML(user.first_name)
18     result[:last_name] = CGI.escapeHTML(user.last_name)
19     @render_note_link = false
20     if user.student?
21       result[:grace_credits] = user.remaining_grace_credits.to_s + '/' + user.grace_credits.to_s
22       if user.has_section?
23         result[:section] = user.section.name
24       else
25         result[:section] = '-'
26       end
27       @render_note_link = true
28     end
29     result[:hidden] = user.hidden
30     result[:filter_table_row_contents] = render_to_string :partial => "users/table_row/filter_table_row", :locals => {:user => user, :controller => self.controller_name, :render_note_link => @render_note_link}
31     return result
32   end
33 
34 end

Generated on Tue Feb 07 00:07:35 -0500 2012 with rcov 0.9.10