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

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

Valid XHTML 1.0! Valid CSS!