From a77cc46b4cce09402285c0fe536b12ae35bc119c Mon Sep 17 00:00:00 2001 From: Steven Miers Date: Mon, 1 Dec 2014 11:52:13 -0600 Subject: [PATCH] Remove puts. Disable tracing for billing test. --- web/app/controllers/api_recurly_controller.rb | 2 -- web/spec/controllers/api_recurly_spec.rb | 16 ++++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/web/app/controllers/api_recurly_controller.rb b/web/app/controllers/api_recurly_controller.rb index e3f39baec..42d74c14d 100644 --- a/web/app/controllers/api_recurly_controller.rb +++ b/web/app/controllers/api_recurly_controller.rb @@ -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 diff --git a/web/spec/controllers/api_recurly_spec.rb b/web/spec/controllers/api_recurly_spec.rb index 11ee343d3..aec34e3b7 100644 --- a/web/spec/controllers/api_recurly_spec.rb +++ b/web/spec/controllers/api_recurly_spec.rb @@ -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