| Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
|---|---|---|---|---|
| app/models/section.rb | 23 | 17 | 100.00%
|
100.00%
|
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 class Section < ActiveRecord::Base |
2 validates_presence_of :name |
3 validates_uniqueness_of :name |
4 has_many :students |
5 |
6 # Returns true when students are part of this section |
7 def has_students? |
8 return !students.empty? |
9 end |
10 |
11 # returns the number of students in this section |
12 def count_students |
13 return students.size |
14 end |
15 |
16 def section_due_date_for(aid) |
17 return SectionDueDate.find_by_assignment_id_and_section_id(aid, self.id) |
18 end |
19 |
20 def user_can_modify?(current_user) |
21 current_user.admin? |
22 end |
23 end |
Generated on Sun Feb 05 00:08:07 -0500 2012 with rcov 0.9.10