C0 code coverage information

Generated on Sat May 27 21:23:32 CEST 2006 with rcov 0.5.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/controllers/admin/content_controller.rb 86 74
67.4% 
63.5% 
 1 class Admin::ContentController < Admin::BaseController
 2 
 3   cache_sweeper :blog_sweeper
 4 
 5   def index
This method was called by:

      1   vendor/rails/actionpack/lib/action_controller/base.rb:853 in 'perform_action_without_filters'

 6     list
 7     render_action 'list'
 8   end
 9 
10   def list
This method was called by:

      1   vendor/rails/actionpack/lib/action_controller/base.rb:853 in 'perform_action_without_filters'
      1   app/controllers/admin/content_controller.rb:6 in 'index'

11     @articles_pages, @articles = paginate :article, :per_page => 15, :order_by => "created_at DESC", :parameter => 'id'
12     @categories = Category.find(:all)
13     @article = Article.new(params[:article])
14     @article.text_filter = config[:text_filter]
15   end
16 
17   def show
This method was called by:

      1   vendor/rails/actionpack/lib/action_controller/base.rb:853 in 'perform_action_without_filters'

18     @article = Article.find(params[:id])
19     @categories = Category.find(:all, :order => 'name')
20   end
21 
22   def new
This method was called by:

      2   vendor/rails/actionpack/lib/action_controller/base.rb:853 in 'perform_action_without_filters'

23     @article = Article.new(params[:article])
24     @article.author = session[:user].login
25     @article.allow_comments ||= config[:default_allow_comments]
26     @article.allow_pings ||= config[:default_allow_pings]
27     @article.text_filter ||= config[:text_filter]
28     @article.user = session[:user]
29     
30     @categories = Category.find_all
31     if request.post?
32       @article.categories.clear
33       @article.categories << Category.find(params[:categories]) if params[:categories]
34       if @article.save 
35         flash[:notice] = 'Article was successfully created.'
36         redirect_to :action => 'show', :id => @article.id
37       end
38     end
39   end
40 
41   def edit
This method was called by:

      2   vendor/rails/actionpack/lib/action_controller/base.rb:853 in 'perform_action_without_filters'

42     @article = Article.find(params[:id])
43     @article.attributes = params[:article]
44     @categories = Category.find_all
45     @selected = @article.categories.collect { |cat| cat.id.to_i }
46     if request.post? 
47       @article.categories.clear
48       @article.categories << Category.find(params[:categories]) if params[:categories]
49       if @article.save 
50         flash[:notice] = 'Article was successfully updated.'
51         redirect_to :action => 'show', :id => @article.id
52       end
53     end      
54   end
55 
56   def destroy
This method was called by:

      2   vendor/rails/actionpack/lib/action_controller/base.rb:853 in 'perform_action_without_filters'

57     @article = Article.find(params[:id])
58     if request.post?
59       @article.destroy
60       redirect_to :action => 'list'
61     end
62   end
63   
64   def category_add
65     @article = Article.find(params[:id])
66     @category = Category.find(params[:category_id])
67     @article.categories << @category
68     @article.save
69     redirect_to :action => 'show', :id => @article.id
70   end
71 
72   def category_remove
73     @article = Article.find(params[:id])
74     @category = Category.find(params[:category_id])
75     @article.categories.delete(@category)
76     @article.save    
77     redirect_to :action => 'show', :id => @article.id
78   end
79   
80   def preview
81     @headers["Content-Type"] = "text/html; charset=utf-8"
82     @article = params[:article]
83     render :layout => false
84   end
85   
86 end

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

Valid XHTML 1.0! Valid CSS!