C0 code coverage information

Generated on Sun Jun 11 23:15:13 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/helpers/articles_helper.rb 77 65
72.7% 
73.8% 
 1 module ArticlesHelper
 2   
 3   def admin_tools_for(model)
Called by
      1   app/views/articles/_comment.rhtml:2 in 'ActionView::Base::CompiledTemplates#_run_html_articles__comment'
      1   app/views/articles/_trackback.rhtml:2 in 'ActionView::Base::CompiledTemplates#_run_html_articles__trackback'

 4     type = model.class.to_s.downcase
 5     tag = []
 6     tag << content_tag("div",
Calls
      2   ActionView::Helpers::TagHelper#content_tag at vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb:21

 7       link_to_remote('nuke', {
Calls
      2   ActionView::Helpers::JavaScriptHelper#link_to_remote at vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb:134

 8           :url => { :action => "nuke_#{type}", :id => model }, 
 9           :complete => visual_effect(:puff, "#{type}-#{model.id}", :duration => 0.6),
Calls
      2   ActionView::Helpers::JavaScriptHelper#visual_effect at vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb:378
      1   Comment#id at (eval):1
      1   Trackback#id at (eval):1

10           :confirm => "Are you sure you want to delete this #{type}?"
11         }, :class => "admintools") <<
12       link_to('edit', {
Calls
      2   ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41

13         :controller => "admin/#{type.pluralize}/article/#{model.article.id}",
Calls
      2   ActiveSupport::CoreExtensions::String::Inflections#pluralize at vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:7
      2   ActiveRecord::Associations::AssociationProxy#method_missing at vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:73

14         :action => "edit", :id => model 
15         }, :class => "admintools"),
16       :id => "admin_#{type}_#{model.id}", :style => "display: none")
Calls
      1   Trackback#id at (eval):1
      1   Comment#id at (eval):1

17     tag.join(" | ")
18   end
19 
20   def onhover_show_admin_tools(type, id = nil)
Called by
      1   app/views/articles/read.rhtml:16 in 'ActionView::Base::CompiledTemplates#_run_html_articles_read'
      1   app/views/articles/_trackback.rhtml:1 in 'ActionView::Base::CompiledTemplates#_run_html_articles__trackback'
      1   app/views/articles/_comment.rhtml:1 in 'ActionView::Base::CompiledTemplates#_run_html_articles__comment'

21     tag = []
22     tag << %{ onmouseover="if (getCookie('is_admin') == 'yes') { Element.show('admin_#{[type, id].compact.join('_')}'); }" }
23     tag << %{ onmouseout="Element.hide('admin_#{[type, id].compact.join('_')}');" }
24     tag
25   end
26   
27   def render_errors(obj)
28     return "" unless obj
29     tag = String.new
30 
31     unless obj.errors.empty?
32       tag << %{<ul class="objerrors">}
33 
34       obj.errors.each_full do |message| 
35         tag << "<li>#{message}</li>"
36       end
37 
38       tag << "</ul>"
39     end
40 
41     tag
42   end  
43   
44   def page_title
Called by
      6   themes/azure/layouts/default.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html__home_batsman_src_rcov_typo_2466460_themes_azure_layouts_default'

45     if @page_title
46       @page_title
47     else
48       config_value("blog_name") || "Typo"
Calls
      4   ApplicationHelper#config_value at app/helpers/application_helper.rb:60

49     end    
50   end
51   
52   def article_links(article)
Called by
      5   app/views/articles/index.rhtml:5 in 'ActionView::Base::CompiledTemplates#_run_html_articles_index'

53     returning code = [] do
Calls
      5   Object#returning at vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb:13

54       code << category_links(article)   unless article.categories.empty?
Calls
      5   ActiveRecord::Associations::AssociationCollection#empty? at vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:103

55       code << comments_link(article)    if article.allow_comments?
Calls
      5   ApplicationHelper#comments_link at app/helpers/application_helper.rb:105
      5   ActiveRecord::Base#method_missing at vendor/rails/activerecord/lib/active_record/base.rb:1479

56       code << trackbacks_link(article)  if article.allow_pings?
Calls
      5   ApplicationHelper#trackbacks_link at app/helpers/application_helper.rb:109
      5   ActiveRecord::Base#method_missing at vendor/rails/activerecord/lib/active_record/base.rb:1479

57     end.join("&nbsp;<strong>|</strong>&nbsp;")
58   end
59   
60   def category_links(article)
61     "Posted in " + article.categories.collect { |c| link_to c.name,
62       { :controller=>"articles", :action=>"category", :id=>c.permalink },
63       :rel => "category tag"
64     }.join(", ")
65   end
66 
67   def author_link(article)
Called by
      5   app/views/articles/_article.rhtml:2 in 'ActionView::Base::CompiledTemplates#_run_html_articles__article'
      1   app/views/articles/read.rhtml:20 in 'ActionView::Base::CompiledTemplates#_run_html_articles_read'

68     if config['link_to_author'] and article.user and article.user.email.to_s.size>0 
Calls
      6   Object#config at app/models/configuration.rb:18
      6   ConfigManager#[] at app/models/config_manager.rb:18

69       "<a href=\"mailto:#{article.user.email}\">#{article.user.name}</a>"
70     elsif article.user and article.user.name.to_s.size>0
71       article.user.name
72     else
73       article.author
Calls
      6   Article#author at (eval):1

74     end
75   end
76 
77 end

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

Valid XHTML 1.0! Valid CSS!