### C0 code coverage information

Generated on Sun Aug 31 02:38:34 -0400 2008 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/categories_controller.rb | `77` | `54` |
`84.4%` |
`77.8%` |

     1 class CategoriesController < ApplicationController
     2   # GET /categories
     3   # GET /categories.xml
     4   def index
     5     @all_categories = Category.find(:all, :order => "name")
     6   end
     7
     8   # GET /categories/1
     9   # GET /categories/1.xml
    10   def show
    11     @category = Category.find(params[:id])
    12
    13     respond_to do |format|
    14       format.html # show.html.erb
    15       format.xml  { render :xml => @category }
    16     end
    17   end
    18
    19   # GET /categories/new
    20   # GET /categories/new.xml
    21   def new
    22     @category = Category.new
    23     @all_categories = Category.find(:all, :order => "name")
    24   end
    25
    26   # GET /categories/1/edit
    27   def edit
    28     @category = Category.find(params[:id])
    29     @all_categories = Category.find(:all, :order => "name")
    30   end
    31
    32   # POST /categories
    33   # POST /categories.xml
    34   def create
    35     @category = Category.new(params[:category])
    36
    37     respond_to do |format|
    38       if @category.save
    39         flash[:notice] = 'Category was successfully created.'
    40         format.html { redirect_to(@category) }
    41         format.xml  { render :xml => @category, :status => :created, :location => @category }
    42       else
    43         format.html { render :action => "new" }
    44         format.xml  { render :xml => @category.errors, :status => :unprocessable_entity }
    45       end
    46     end
    47   end
    48
    49   # PUT /categories/1
    50   # PUT /categories/1.xml
    51   def update
    52     @category = Category.find(params[:id])
    53
    54     respond_to do |format|
    55       if @category.update_attributes(params[:category])
    56         flash[:notice] = 'Category was successfully updated.'
    57         format.html { redirect_to(@category) }
    58         format.xml  { head :ok }
    59       else
    60         format.html { render :action => "edit" }
    61         format.xml  { render :xml => @category.errors, :status => :unprocessable_entity }
    62       end
    63     end
    64   end
    65
    66   # DELETE /categories/1
    67   # DELETE /categories/1.xml
    68   def destroy
    69     @category = Category.find(params[:id])
    70     @category.destroy
    71
    72     respond_to do |format|
    73       format.html { redirect_to(categories_url) }
    74       format.xml  { head :ok }
    75     end
    76   end
    77 end

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