C0 code coverage information
Generated on Sun May 10 11:15:55 +0100 2009 with rcov 0.8.2.1
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.
1 class BookingsController < ApplicationController
2
3 cattr_accessor :netbanx_url
4
5 include CRUDMethods
6 resource :booking
7
8 def redirect_after_successfull_create
9 pay
10 end
11
12 def pay
13 @booking ||= Booking.find(params[:id])
14 @booking.pay
15 if @booking.no_charge?
16 UserMailer.deliver_free_ticket_confirmation(@booking)
17 render :action => 'pay'
18 else
19 case @booking.payment_method
20 when 'online'
21 net_banx_payment = NetBanxPayment.for_booking(@booking)
22 net_banx_payment.save!
23 net_banx_payment.return_url = update_from_netbanx_net_banx_payment_url(net_banx_payment)
24 redirect_to net_banx_payment.redirect
25 when 'invoice'
26 UserMailer.deliver_invoice_request(@booking)
27 render :action => 'pay'
28 end
29 end
30 end
31
32 def users
33 @user = User.find(params[:user_id])
34 @bookings = @user.bookings.find(:all,:order => 'created_at DESC')
35 respond_appropriately
36 end
37
38 end
Generated using the rcov code coverage analysis tool for Ruby
version 0.8.2.1.