Remove puts. Disable tracing for billing test.

This commit is contained in:
Steven Miers 2014-12-01 11:52:13 -06:00
parent 76548b1af1
commit a77cc46b4c
2 changed files with 8 additions and 10 deletions

View File

@ -7,7 +7,6 @@ class ApiRecurlyController < ApiController
# create Recurly account
def create_account
@account = @client.find_or_create_account(current_user, params[:billing_info])
puts "JSON: #{JSON.generate(@account)}"
render :json=>account_json(@account)
rescue RecurlyClientError => x
render json: { :message => x.inspect, errors: x.errors }, :status => 404
@ -50,7 +49,6 @@ class ApiRecurlyController < ApiController
# update Billing Information
def update_billing_info
@account=@client.update_billing_info(current_user, params[:billing_info])
puts "Updated billing on account: #{@account}"
render :json=> account_json(@account)
rescue RecurlyClientError => x
render json: { message: x.inspect, errors: x.errors}, :status => 404

View File

@ -93,16 +93,16 @@ describe ApiRecurlyController, :type=>:controller do
it "should update billing info" do
#pending "this fails in the controller spec only, possibly because it contacts an external site."
$enable_tracing = false
$trace_out = open('trace.txt', 'w')
# $enable_tracing = false
# $trace_out = open('trace.txt', 'w')
set_trace_func proc { |event, file, line, id, binding, classname|
if $enable_tracing && event == 'call' && !file.start_with?("/Users/tangledpath/.ddrvm/")
$trace_out.puts "#{file}:#{line} #{classname}##{id}"
end
}
# set_trace_func proc { |event, file, line, id, binding, classname|
# if $enable_tracing && event == 'call' && !file.start_with?("/Users/tangledpath/.ddrvm/")
# $trace_out.puts "#{file}:#{line} #{classname}##{id}"
# end
# }
$enable_tracing = true
# $enable_tracing = true
post :create_account
response.should be_success