Skip to content

Instantly share code, notes, and snippets.

@cmar
Created March 13, 2014 19:53
Show Gist options
  • Save cmar/9535654 to your computer and use it in GitHub Desktop.
Save cmar/9535654 to your computer and use it in GitHub Desktop.
Script started on Thu Mar 13 15:52:22 2014
[?1034hrails_frontend (master)$ ag zip_codecd testrails cgrep request test/rfegrep request test/rails ccd testag zip_codertest test/capybara/lab_buynow_resave_test.rb -n "/choosing the resave option/"
Run options: -n "/choosing the resave option/"
# Running tests:
############################################################
{"color_counts"=>{"front"=>"0", "back"=>"0", "sleeve"=>"0"}, "redraw"=>"false", "items"=>[{"product_id"=>"04600", "sizes"=>{"YXS"=>"0", "YS"=>"0", "YM"=>"0", "YL"=>"0", "YXL"=>"0", "S"=>"0", "M"=>"0", "L"=>"0", "XL"=>"0", "XXL"=>"0", "XXXL"=>"0", "XXXXL"=>"undefined"}, "name_count"=>"0", "number_count"=>"0"}], "sponsorship"=>"false", "postal_code"=>"37130", "fullcolor1"=>"false", "fullcolor2"=>"false", "fullcolor3"=>"false", "options"=>{"validate_availability_of_sizes"=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa76bb23580 @errors={"quantity"=>[{"message"=>"No quantities entered", "wcibmo"=>"enter_quantities", "code"=>1}]}, @postal_code="37130", @color_counts={"front"=>[], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa76bb21bb8 @errors={}, @product_id=4600, @quantity=0, @sizes={"YXS"=>0, "YS"=>0, "YM"=>0, "YL"=>0, "YXL"=>0, "S"=>0, "M"=>0, "L"=>0, "XL"=>0, "XXL"=>0, "XXXL"=>0, "XXXXL"=>0}, @unit_price=nil, @price=nil, @quote=#<QuoteClient::Quote:0x007fa76bb23580 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method=nil, @fulfillment_method_id=nil, @pricing_test_name="CtlC_1112", @quantity=0, @price=nil, @minimum_quantity=nil, @wcibmo="enter_quantities", @options={}>
############################################################
############################################################
{"color_counts"=>{"front"=>"1", "back"=>"0", "sleeve"=>"0"}, "redraw"=>"false", "items"=>[{"product_id"=>"04600", "sizes"=>{"YXS"=>"0", "YS"=>"0", "YM"=>"0", "YL"=>"0", "YXL"=>"0", "S"=>"0", "M"=>"0", "L"=>"0", "XL"=>"0", "XXL"=>"0", "XXXL"=>"0", "XXXXL"=>"undefined"}, "name_count"=>"0", "number_count"=>"0"}], "sponsorship"=>"false", "postal_code"=>"37130", "fullcolor1"=>"false", "fullcolor2"=>"false", "fullcolor3"=>"false", "options"=>{"validate_availability_of_sizes"=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa76dbb4628 @errors={"quantity"=>[{"message"=>"No quantities entered", "wcibmo"=>"enter_quantities", "code"=>1}]}, @postal_code="37130", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa76dbb2c60 @errors={}, @product_id=4600, @quantity=0, @sizes={"YXS"=>0, "YS"=>0, "YM"=>0, "YL"=>0, "YXL"=>0, "S"=>0, "M"=>0, "L"=>0, "XL"=>0, "XXL"=>0, "XXXL"=>0, "XXXXL"=>0}, @unit_price=nil, @price=nil, @quote=#<QuoteClient::Quote:0x007fa76dbb4628 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method=nil, @fulfillment_method_id=nil, @pricing_test_name="CtlC_1112", @quantity=0, @price=nil, @minimum_quantity=nil, @wcibmo="enter_quantities", @options={}>
############################################################
############################################################
{:postal_code=>"37130", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa770a9d958 @errors={"quantity"=>[{"message"=>"No quantities entered", "wcibmo"=>"enter_quantities", "code"=>1}]}, @postal_code="37130", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa770a9c350 @errors={}, @product_id=4600, @quantity=0, @sizes={}, @unit_price=nil, @price=nil, @quote=#<QuoteClient::Quote:0x007fa770a9d958 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method=nil, @fulfillment_method_id=nil, @pricing_test_name="CtlC_1112", @quantity=0, @price=nil, @minimum_quantity=nil, @wcibmo="enter_quantities", @options={}>
############################################################
############################################################
{:postal_code=>"37130", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"M"=>6}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa7877bb2c8 @errors={}, @postal_code="37130", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa7877c1f60 @errors={}, @product_id=4600, @quantity=6, @sizes={"M"=>6}, @unit_price=#<BigDecimal:7fa7877c1b28,'0.2062E2',18(18)>, @price=#<BigDecimal:7fa7877c1ab0,'0.12372E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa7877bb2c8 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="CtlC_1112", @quantity=6, @price=#<BigDecimal:7fa7877c1880,'0.12372E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{:postal_code=>"37130", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"S"=>6}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa771ebedb0 @errors={}, @postal_code="37130", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa771ebda50 @errors={}, @product_id=4600, @quantity=6, @sizes={"S"=>6}, @unit_price=#<BigDecimal:7fa771ebd618,'0.2062E2',18(18)>, @price=#<BigDecimal:7fa771ebd5a0,'0.12372E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa771ebedb0 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="CtlC_1112", @quantity=6, @price=#<BigDecimal:7fa771ec5340,'0.12372E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{:postal_code=>"37130", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"S"=>1}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa7729c4bd8 @errors={}, @postal_code="37130", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa7729c3878 @errors={}, @product_id=4600, @quantity=1, @sizes={"S"=>1}, @unit_price=#<BigDecimal:7fa7729c3440,'0.2075E2',18(18)>, @price=#<BigDecimal:7fa7729cb398,'0.2075E2',18(18)>, @quote=#<QuoteClient::Quote:0x007fa7729c4bd8 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Printing", @fulfillment_method_id=10001, @pricing_test_name="CtlC_1112", @quantity=1, @price=#<BigDecimal:7fa7729cb168,'0.2075E2',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{"color_counts"=>{"front"=>"1", "back"=>"0", "sleeve"=>"0"}, "redraw"=>"false", "items"=>[{"product_id"=>"04600", "sizes"=>{"YXS"=>"0", "YS"=>"0", "YM"=>"0", "YL"=>"0", "YXL"=>"0", "S"=>"0", "M"=>"6", "L"=>"0", "XL"=>"0", "XXL"=>"0", "XXXL"=>"0", "XXXXL"=>"0"}, "name_count"=>"0", "number_count"=>"0"}], "sponsorship"=>"false", "postal_code"=>"37130", "fullcolor1"=>"false", "fullcolor2"=>"false", "fullcolor3"=>"false", "options"=>{"validate_availability_of_sizes"=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa771fe5ec8 @errors={}, @postal_code="37130", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa771fe47f8 @errors={}, @product_id=4600, @quantity=6, @sizes={"YXS"=>0, "YS"=>0, "YM"=>0, "YL"=>0, "YXL"=>0, "S"=>0, "M"=>6, "L"=>0, "XL"=>0, "XXL"=>0, "XXXL"=>0, "XXXXL"=>0}, @unit_price=#<BigDecimal:7fa771fe4208,'0.2062E2',18(18)>, @price=#<BigDecimal:7fa771fe4190,'0.12372E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa771fe5ec8 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="CtlC_1112", @quantity=6, @price=#<BigDecimal:7fa771fe3f60,'0.12372E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{:postal_code=>"22102", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"M"=>6}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa774837020 @errors={}, @postal_code="22102", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa774835cc0 @errors={}, @product_id=4600, @quantity=6, @sizes={"M"=>6}, @unit_price=#<BigDecimal:7fa774835888,'0.2062E2',18(18)>, @price=#<BigDecimal:7fa774835810,'0.12372E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa774837020 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="TestC_1112", @quantity=6, @price=#<BigDecimal:7fa7748355e0,'0.12372E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{:postal_code=>"22102", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"S"=>6}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa774859c88 @errors={}, @postal_code="22102", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa774858928 @errors={}, @product_id=4600, @quantity=6, @sizes={"S"=>6}, @unit_price=#<BigDecimal:7fa7748584f0,'0.2062E2',18(18)>, @price=#<BigDecimal:7fa774858478,'0.12372E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa774859c88 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="TestC_1112", @quantity=6, @price=#<BigDecimal:7fa774858248,'0.12372E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{:postal_code=>"22102", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"S"=>1}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa7703f2ab8 @errors={}, @postal_code="22102", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa7703f1758 @errors={}, @product_id=4600, @quantity=1, @sizes={"S"=>1}, @unit_price=#<BigDecimal:7fa7703f1320,'0.2075E2',18(18)>, @price=#<BigDecimal:7fa7703f12a8,'0.2075E2',18(18)>, @quote=#<QuoteClient::Quote:0x007fa7703f2ab8 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Printing", @fulfillment_method_id=10001, @pricing_test_name="TestC_1112", @quantity=1, @price=#<BigDecimal:7fa7703f1078,'0.2075E2',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{:postal_code=>"22102", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"M"=>12}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa770eec1f8 @errors={}, @postal_code="22102", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa770eeae98 @errors={}, @product_id=4600, @quantity=12, @sizes={"M"=>12}, @unit_price=#<BigDecimal:7fa770eeaa60,'0.118E2',18(18)>, @price=#<BigDecimal:7fa770eea9e8,'0.1416E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa770eec1f8 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="TestC_1112", @quantity=12, @price=#<BigDecimal:7fa770eea7b8,'0.1416E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{"color_counts"=>{"front"=>"1", "back"=>"0", "sleeve"=>"0"}, "redraw"=>"false", "items"=>[{"product_id"=>"04600", "sizes"=>{"YXS"=>"0", "YS"=>"0", "YM"=>"0", "YL"=>"0", "YXL"=>"0", "S"=>"0", "M"=>"6", "L"=>"0", "XL"=>"0", "XXL"=>"0", "XXXL"=>"0", "XXXXL"=>"0"}, "name_count"=>"0", "number_count"=>"0"}], "sponsorship"=>"false", "postal_code"=>"22102", "fullcolor1"=>"false", "fullcolor2"=>"false", "fullcolor3"=>"false", "options"=>{"validate_availability_of_sizes"=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa764f80b20 @errors={}, @postal_code="22102", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa764f7f450 @errors={}, @product_id=4600, @quantity=6, @sizes={"YXS"=>0, "YS"=>0, "YM"=>0, "YL"=>0, "YXL"=>0, "S"=>0, "M"=>6, "L"=>0, "XL"=>0, "XXL"=>0, "XXXL"=>0, "XXXXL"=>0}, @unit_price=#<BigDecimal:7fa764f7ee60,'0.2062E2',18(18)>, @price=#<BigDecimal:7fa764f7ede8,'0.12372E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa764f80b20 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="TestC_1112", @quantity=6, @price=#<BigDecimal:7fa764f7ebb8,'0.12372E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{:postal_code=>"22102", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"M"=>6}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa77601ea58 @errors={}, @postal_code="22102", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa77601d6f8 @errors={}, @product_id=4600, @quantity=6, @sizes={"M"=>6}, @unit_price=#<BigDecimal:7fa7760252b8,'0.2062E2',18(18)>, @price=#<BigDecimal:7fa776025240,'0.12372E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa77601ea58 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="TestC_1112", @quantity=6, @price=#<BigDecimal:7fa776025010,'0.12372E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
############################################################
{:postal_code=>nil, :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"M"=>6}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa774cfd910 @errors={"postal_code"=>[{"message"=>"Invalid postal code format", "wcibmo"=>"invalid_shipping_postal_code", "code"=>8}]}, @postal_code=nil, @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa774cfc2b8 @errors={}, @product_id=4600, @quantity=6, @sizes={"M"=>6}, @unit_price=nil, @price=nil, @quote=#<QuoteClient::Quote:0x007fa774cfd910 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method=nil, @fulfillment_method_id=nil, @pricing_test_name="no_zip", @quantity=6, @price=nil, @minimum_quantity=6, @wcibmo="invalid_shipping_postal_code", @options={}>
############################################################
############################################################
{:postal_code=>"22102", :color_counts=>{:front=>1, :back=>0}, :items=>[{:product_id=>4600, :sizes=>{"M"=>6}, :name_count=>0, :number_count=>0}], :sponsorship=>false, :redraw=>false, :options=>{:validate_format_of_postal_code=>true, :validate_availability_of_sizes=>true, :validate_minimum_quantity=>true}}
------------------------------------------------------------
#<QuoteClient::Quote:0x007fa775b43380 @errors={}, @postal_code="22102", @color_counts={"front"=>[1], "back"=>[], "sleeve"=>[], "hood"=>[]}, @items=[#<QuoteClient::Item:0x007fa775b42020 @errors={}, @product_id=4600, @quantity=6, @sizes={"M"=>6}, @unit_price=#<BigDecimal:7fa775b49bb8,'0.2062E2',18(18)>, @price=#<BigDecimal:7fa775b49b40,'0.12372E3',18(18)>, @quote=#<QuoteClient::Quote:0x007fa775b43380 ...>, @recovery=nil, @name_count=0, @number_count=0>], @sponsorship=false, @redraw=false, @decoration_method="Screen Printing", @fulfillment_method_id=10000, @pricing_test_name="TestC_1112", @quantity=6, @price=#<BigDecimal:7fa775b49910,'0.12372E3',18(18)>, @minimum_quantity=1, @wcibmo=nil, @options={}>
############################################################
.
Finished tests in 41.851646s, 0.0239 tests/s, 0.0000 assertions/s.
1 tests, 0 assertions, 0 failures, 0 errors, 0 skips
rails_frontend (master)$ exit
Script done on Thu Mar 13 15:53:44 2014
@cmar
Copy link
Author

cmar commented Mar 13, 2014

VCR.configure do |c|
  c.ignore_request do |request|
    true
  end
end


QuoteClient::Quote.class_eval do

  class << self

    def generate_with_puts(params)
      puts '#' * 60
      puts params
      puts '-' * 60
      result = generate_without_puts(params)

      puts result.inspect
      puts '#' * 60

      result
    end

    alias_method :generate_without_puts, :generate
    alias_method :generate, :generate_with_puts
  end

end

@cmar
Copy link
Author

cmar commented Mar 13, 2014

ruby -Itest test/capybara/lab_buynow_resave_test.rb -n "/choosing the resave option/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment