| Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
|---|---|---|---|---|
| app/helpers/main_helper.rb | 27 | 19 | 85.19%
|
84.21%
|
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 MainHelper |
2 |
3 protected |
4 |
5 # Sets current user for this session |
6 def current_user=(user) |
7 session[:uid] = (user.blank? || !user.kind_of?(User)) ? nil : user.id |
8 end |
9 |
10 def get_blank_message(blank_login, blank_password) |
11 return "" unless blank_login || blank_password |
12 |
13 if blank_login && blank_password |
14 message = I18n.t(:username_and_password_not_blank) |
15 elsif blank_login |
16 message = I18n.t(:username_not_blank) |
17 elsif blank_password |
18 message = I18n.t(:password_not_blank) |
19 end |
20 |
21 end |
22 |
23 def due_date_color(assignment) |
24 return assignment.past_collection_date? ? 'after' : 'before' |
25 end |
26 |
27 end |
Generated on Tue Feb 07 00:07:35 -0500 2012 with rcov 0.9.10