C0 code coverage information

Generated on Fri Feb 20 01:17:01 -0800 2009 with rcov 0.8.1.2


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/ideas_controller.rb 87 62
100.0%  
100.0%  
 1
    class IdeasController < ApplicationController  2 # GET /ideas  3 # GET /ideas.xml  4 def index  5 @ideas = Idea.find(:all)  6  7 respond_to do |format|  8 format.html # index.html.erb  9 format.xml { render :xml => @ideas
    } 10 end 11 end 12 13 # GET /ideas/1 14 # GET /ideas/1.xml 15 def show 16 @idea = Idea.find(params[:id]) 17 @comment = session[:new_comment] ||
    Comment.new 18
    session[:new_comment] = nil 19 20
    respond_to do |format| 21
    format.html # show.html.erb 22 format.xml { render :xml => @idea } 23 end 24 end 25 26 # GET /ideas/new 27 # GET /ideas/new.xml 28 def new 29 @idea = Idea.new 30 31
    respond_to do |format| 32
    format.html # new.html.erb 33 format.xml { render :xml => @idea } 34 end 35 end 36 37 # GET /ideas/1/edit 38 def edit 39 @idea = Idea.find(params[:id]) 40 end 41 42 # POST /ideas 43 # POST /ideas.xml 44 def create 45 @idea = Idea.new(params[:idea]) 46 47 respond_to do |format| 48 if @idea.save 49 flash[:notice] = 'Idea was successfully created.'
    50 format.html {
    redirect_to(@idea) } 51
    format.xml { render :xml => @idea, :status => :created, :location
    => @idea } 52 else
    53 format.html { render
    :action => "new" } 54 format.xml { render :xml => @idea.errors, :status
    => :unprocessable_entity } 55 end 56 end 57 end 58 59
    # PUT /ideas/1 60 # PUT
    /ideas/1.xml 61 def update
    62 @idea =
    Idea.find(params[:id]) 63 64
    respond_to do |format| 65
    if @idea.update_attributes(params[:idea]) 66 flash[:notice] = 'Idea was successfully updated.'
    67 format.html {
    redirect_to(@idea) } 68
    format.xml { head :ok } 69 else 70 format.html { render :action => "edit" }
    71 format.xml { render
    :xml => @idea.errors, :status => :unprocessable_entity } 72 end 73 end 74 end 75 76 # DELETE /ideas/1 77 # DELETE /ideas/1.xml 78 def destroy 79 @idea = Idea.find(params[:id]) 80 @idea.destroy 81 82 respond_to do |format| 83 format.html { redirect_to(ideas_url) } 84 format.xml { head :ok } 85 end 86 end 87 end 

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