| Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
|---|---|---|---|---|
| app/models/section.rb | 16 | 11 | 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 end |
Generated on Wed Sep 08 00:10:31 -0400 2010 with rcov 0.9.8