C0 code coverage information

Generated on Sun Jun 11 23:15:14 CEST 2006 with rcov 0.6.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/category.rb 30 23
73.3% 
65.2% 
 1 class Category < ActiveRecord::Base
Calls
      1   #<Class:ActiveRecord::Base>#inherited at vendor/rails/activerecord/lib/active_record/base.rb:246

 2   acts_as_list
Calls
      1   ActiveRecord::Acts::List::ClassMethods#acts_as_list at vendor/rails/activerecord/lib/active_record/acts/list.rb:34

 3   has_and_belongs_to_many :articles, :order => "created_at DESC"
Calls
      1   #<Class:ActiveRecord::Base>#has_and_belongs_to_many at (eval):4

 4   
 5   def self.find_all_with_article_counters
 6     self.find_by_sql(%{
 7       SELECT id, name, permalink, position, COUNT(article_id) AS article_counter
 8       FROM categories LEFT OUTER JOIN articles_categories 
 9         ON articles_categories.category_id = categories.id
10       GROUP BY categories.id, categories.name, categories.position, categories.permalink
11       ORDER BY name
12       })
13   end
14   
15   def stripped_name
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
      1   app/models/category.rb:24 in 'Category#set_defaults'

16     self.name.to_url
Calls
      1   String#to_url at lib/transforms.rb:18
      1   Category#name at (eval):1

17   end
18   
19   protected  
20   
21   before_save :set_defaults
Calls
      1   #<Class:ActiveRecord::Base>#before_save at (eval):1

22   
23   def set_defaults
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
      2   vendor/rails/activerecord/lib/active_record/callbacks.rb:333 in 'ActiveRecord::Callbacks#callback'

24     self.permalink ||= self.stripped_name
Calls
      2   Category#permalink at (eval):1
      1   Category#stripped_name at app/models/category.rb:15
      1   ActiveRecord::Base#method_missing at vendor/rails/activerecord/lib/active_record/base.rb:1479

25   end
26   
27   validates_presence_of :name
Calls
      1   ActiveRecord::Validations::ClassMethods#validates_presence_of at vendor/rails/activerecord/lib/active_record/validations.rb:372

28   validates_uniqueness_of :name, :on => :create
Calls
      1   ActiveRecord::Validations::ClassMethods#validates_uniqueness_of at vendor/rails/activerecord/lib/active_record/validations.rb:486

29 end
30 

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

Valid XHTML 1.0! Valid CSS!