C0 code coverage information

Generated on Fri Aug 25 11:26:26 PDT 2006 with rcov 0.7.0


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
app/models/auditor.rb 42 34
95.2% 
94.1% 
 1 module Auditor
 2 
 3     def audit_create
 4         audit('CREATE')
 5     end
 6 
 7     def audit_update
 8         audit('UPDATE')
 9     end
10 
11     def audit_destroy
12         audit('DESTROY')
13     end
14 
15     def modify_timestamp
16         unless @dont_timestamp
17             self.updated_at = Time.now
18         end
19     end
20 
21     def create_timestamp
22         unless @dont_timestamp
23             self.created_at = Time.now
24         end
25     end
26 
27     protected
28 
29     def audit(action)
30         if self.class::audit_switch? and !@dont_audit
31             Audit.new do |audit|
32                 audit.item_type = self.class.to_s
33                 audit.action = action
34                 audit.user_id = self.editor.id if self.editor
35                 audit.item_id = self.id
36                 audit.action_at = Time.now
37                 # audit.data = self.inspect off for now because it creates a ton of data
38                 audit.save
39             end
40         end
41     end
42 end

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

Valid XHTML 1.0! Valid CSS!