C0 code coverage information

Generated on Mon Dec 08 16:53:35 -0800 2008 with rcov 0.8.1.3


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

Valid XHTML 1.0! Valid CSS!