Skip to content

Instantly share code, notes, and snippets.

@amw
Created April 15, 2011 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amw/921094 to your computer and use it in GitHub Desktop.
Save amw/921094 to your computer and use it in GitHub Desktop.
$rake spec
(in /home/amw/spree)
########################### api #########################
rm api/Gemfile*
cd api && /var/lib/gems/1.8/bin/rake test_app
(in /home/amw/spree/api)
run rails new test_app --database=sqlite3 -GJTq --skip-gemfile from "./spec"
run rake spree_core:install from "./test_app"
(in /home/amw/spree/api/spec/test_app)
run rake spree_auth:install from "./test_app"
(in /home/amw/spree/api/spec/test_app)
run rake spree_api:install from "./test_app"
(in /home/amw/spree/api/spec/test_app)
Couldn't drop db/test.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/api/spec/test_app/db/test.sqlite3>
Couldn't drop db/cucumber.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/api/spec/test_app/db/cucumber.sqlite3>
cd api && /var/lib/gems/1.8/bin/rake spec
(in /home/amw/spree/api)
/usr/bin/ruby1.8 -S bundle exec rspec ./spec/controllers/api/spree_base_controller_spec.rb ./spec/models/user_spec.rb
........
Finished in 0.24143 seconds
8 examples, 0 failures
########################### auth #########################
rm auth/Gemfile*
cd auth && /var/lib/gems/1.8/bin/rake test_app
(in /home/amw/spree/auth)
run rails new test_app --database=sqlite3 -GJTq --skip-gemfile from "./spec"
run rake spree_auth:install from "./test_app"
(in /home/amw/spree/auth/spec/test_app)
run rake spree_core:install from "./test_app"
(in /home/amw/spree/auth/spec/test_app)
Couldn't drop db/test.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/auth/spec/test_app/db/test.sqlite3>
Couldn't drop db/cucumber.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/auth/spec/test_app/db/cucumber.sqlite3>
cd auth && /var/lib/gems/1.8/bin/rake spec
(in /home/amw/spree/auth)
/usr/bin/ruby1.8 -S bundle exec rspec ./spec/controllers/checkout_controller_spec.rb ./spec/controllers/user_sessions_controller_spec.rb ./spec/controllers/admin_base_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/controllers/orders_controller_spec.rb ./spec/lib/token_resource_spec.rb ./spec/models/order_spec.rb ./spec/models/ability_spec.rb ./spec/models/user_spec.rb
.................................................................................................
Finished in 1.95 seconds
97 examples, 0 failures
########################### core #########################
rm core/Gemfile*
cd core && /var/lib/gems/1.8/bin/rake test_app
(in /home/amw/spree/core)
run rails new test_app --database=sqlite3 -GJTq --skip-gemfile from "./spec"
run rake spree_core:install from "./test_app"
(in /home/amw/spree/core/spec/test_app)
Couldn't drop db/test.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/core/spec/test_app/db/test.sqlite3>
Couldn't drop db/cucumber.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/core/spec/test_app/db/cucumber.sqlite3>
cd core && /var/lib/gems/1.8/bin/rake spec
(in /home/amw/spree/core)
/usr/bin/ruby1.8 -S bundle exec rspec ./spec/controllers/content_controller_spec.rb ./spec/controllers/checkout_controller_spec.rb ./spec/controllers/admin/products_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/admin/mail_methods_controller_spec.rb ./spec/controllers/admin/orders_controller_spec.rb ./spec/controllers/orders_controller_spec.rb ./spec/lib/mail_settings_spec.rb ./spec/lib/ext_spec.rb ./spec/lib/calculated_adjustments_spec.rb ./spec/lib/mail_interceptor_spec.rb ./spec/models/shipment_spec.rb ./spec/models/mail_method_spec.rb ./spec/models/shipping_method_spec.rb ./spec/models/configuration_spec.rb ./spec/models/taxon_spec.rb ./spec/models/state_spec.rb ./spec/models/payment_method_spec.rb ./spec/models/tracer_spec.rb ./spec/models/tax_rate_spec.rb ./spec/models/inventory_unit_spec.rb ./spec/models/shipping_category_spec.rb ./spec/models/country_spec.rb ./spec/models/address_spec.rb ./spec/models/order_spec.rb ./spec/models/gateway/authorize_net_cim_spec.rb ./spec/models/gateway/braintree_spec.rb ./spec/models/gateway/authorize_net_spec.rb ./spec/models/calculator/flat_percent_item_total_spec.rb ./spec/models/product_property_spec.rb ./spec/models/creditcard_spec.rb ./spec/models/tax_category_spec.rb ./spec/models/taxonomy_spec.rb ./spec/models/adjustment_spec.rb ./spec/models/return_authorization_spec.rb ./spec/models/variant_spec.rb ./spec/models/product_scope_spec.rb ./spec/models/user_spec.rb ./spec/models/product_spec.rb ./spec/models/product_group_spec.rb ./spec/models/product_option_type_spec.rb ./spec/models/line_item_spec.rb ./spec/models/payment_spec.rb
.....................................*.......................**...**.......................F.........FFFFF...FFFF...........................F.FFFFF.FFFFFFFFFF.....................*...............*...........................................**.........FFF.FFFF........FF.FFFFF.FFFFF.FFF.FF.F..FFFF.FFFFF................................FF.F...F*........................................FFFFFFFFFFF..............F.............................
Pending:
OrdersController#empty should redirect back to cart
# Not Yet Implemented
# ./spec/controllers/orders_controller_spec.rb:70
OrderMailer#deliver when intercept_email is provided should strip the bcc recipients
# Not Yet Implemented
# ./spec/lib/mail_interceptor_spec.rb:41
OrderMailer#deliver when intercept_email is provided should strip the cc recipients
# Not Yet Implemented
# ./spec/lib/mail_interceptor_spec.rb:42
OrderMailer#deliver when intercept_mode is not provided should bcc the address specified in the preference
# Not Yet Implemented
# ./spec/lib/mail_interceptor_spec.rb:65
OrderMailer#deliver when intercept_mode is not provided should not change the recipient
# Not Yet Implemented
# ./spec/lib/mail_interceptor_spec.rb:66
Order#save should destroy any line_items with zero quantity
# Not Yet Implemented
# ./spec/models/order_spec.rb:78
Order#finalize! should change the shipment state to ready if order is paid
# Not Yet Implemented
# ./spec/models/order_spec.rb:193
Order#cancel should restock inventory
# Not Yet Implemented
# ./spec/models/order_spec.rb:525
Order#cancel should change shipment status (unless shipped)
# Not Yet Implemented
# ./spec/models/order_spec.rb:526
Adjustment should accept a negative amount
# Not Yet Implemented
# ./spec/models/adjustment_spec.rb:22
Failures:
1) MailMethod current should return the first active mail method corresponding to the current environment
Failure/Error: MailMethod.current.should == method
expected: #<MailMethod id: 1, environment: "test", active: true, created_at: "2011-04-15 03:25:35", updated_at: "2011-04-15 03:25:35">
got: nil (using ==)
# ./spec/models/mail_method_spec.rb:12
2) State shoulda validations
Failure/Error: it {should belong_to(:country) }
NoMethodError:
undefined method `belong_to' for #<RSpec::Core::ExampleGroup::Nested_17::Nested_1:0x7f4c39c93a38>
# ./spec/models/state_spec.rb:5
3) State shoulda validations
Failure/Error: it {should have_one(:zone_member) }
NoMethodError:
undefined method `has_one?' for #<State id: nil, name: nil, abbr: nil, country_id: nil>
# ./spec/models/state_spec.rb:6
4) State shoulda validations
Failure/Error: it {should have_one(:zone) }
NoMethodError:
undefined method `has_one?' for #<State id: nil, name: nil, abbr: nil, country_id: nil>
# ./spec/models/state_spec.rb:7
5) State shoulda validations
Failure/Error: it {should validate_presence_of(:name) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_17::Nested_1:0x7f4c39c88fe8>
# ./spec/models/state_spec.rb:8
6) State shoulda validations
Failure/Error: it {should validate_presence_of(:country) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_17::Nested_1:0x7f4c39c86400>
# ./spec/models/state_spec.rb:9
7) PaymentMethod#available should return all methods available to front-end/back-end when no parameter is passed
Failure/Error: PaymentMethod.available.size.should == 2
expected: 2
got: 0 (using ==)
# ./spec/models/payment_method_spec.rb:30
8) PaymentMethod#available should return all methods available to front-end/back-end when display_on = :both
Failure/Error: PaymentMethod.available(:both).size.should == 2
expected: 2
got: 0 (using ==)
# ./spec/models/payment_method_spec.rb:34
9) PaymentMethod#available should return all methods available to front-end when display_on = :front_end
Failure/Error: PaymentMethod.available(:front_end).size.should == 2
expected: 2
got: 0 (using ==)
# ./spec/models/payment_method_spec.rb:38
10) PaymentMethod#available should return all methods available to back-end when display_on = :back_end
Failure/Error: PaymentMethod.available(:back_end).size.should == 2
expected: 2
got: 0 (using ==)
# ./spec/models/payment_method_spec.rb:42
11) ShippingCategory validations
Failure/Error: it { should validate_presence_of(:name) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_22::Nested_1:0x7f4c39fa1428>
# ./spec/models/shipping_category_spec.rb:6
12) Country shoulda validations
Failure/Error: it {should have_many(:states) }
NoMethodError:
undefined method `has_many?' for #<Country:0x7f4c39f60310>
# ./spec/models/country_spec.rb:5
13) Country shoulda validations
Failure/Error: it {should have_one(:zone_member) }
NoMethodError:
undefined method `has_one?' for #<Country:0x7f4c39f571e8>
# ./spec/models/country_spec.rb:6
14) Country shoulda validations
Failure/Error: it {should have_one(:zone) }
NoMethodError:
undefined method `has_one?' for #<Country:0x7f4c39f4bc30>
# ./spec/models/country_spec.rb:7
15) Country shoulda validations
Failure/Error: it {should validate_presence_of(:name) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_23::Nested_1:0x7f4c39f45588>
# ./spec/models/country_spec.rb:8
16) Country shoulda validations
Failure/Error: it {should validate_presence_of(:iso_name) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_23::Nested_1:0x7f4c39f3f020>
# ./spec/models/country_spec.rb:9
17) Address validations
Failure/Error: it { should belong_to(:country) }
NoMethodError:
undefined method `belong_to' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39ed7308>
# ./spec/models/address_spec.rb:5
18) Address validations
Failure/Error: it { should belong_to(:state) }
NoMethodError:
undefined method `belong_to' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39ecbee0>
# ./spec/models/address_spec.rb:6
19) Address validations
Failure/Error: it { should have_many(:shipments) }
NoMethodError:
undefined method `has_many?' for #<Address:0x7f4c39ec0630>
# ./spec/models/address_spec.rb:7
20) Address validations
Failure/Error: it { should validate_presence_of(:firstname) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39ebbbd0>
# ./spec/models/address_spec.rb:8
21) Address validations
Failure/Error: it { should validate_presence_of(:lastname) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39eb0938>
# ./spec/models/address_spec.rb:9
22) Address validations
Failure/Error: it { should validate_presence_of(:address1) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39eaa1a0>
# ./spec/models/address_spec.rb:10
23) Address validations
Failure/Error: it { should validate_presence_of(:city) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39ea6348>
# ./spec/models/address_spec.rb:11
24) Address validations
Failure/Error: it { should validate_presence_of(:zipcode) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39ea24c8>
# ./spec/models/address_spec.rb:12
25) Address validations
Failure/Error: it { should validate_presence_of(:country) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39e9e738>
# ./spec/models/address_spec.rb:13
26) Address validations
Failure/Error: it { should validate_presence_of(:phone) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_24::Nested_1:0x7f4c39e9ac00>
# ./spec/models/address_spec.rb:14
27) Gateway::Braintree authorize should work through the spree payment interface
Failure/Error: @payment.process!
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:65:in `authorize'
# ./app/models/creditcard.rb:16:in `process!'
# ./app/models/payment.rb:74:in `process!'
# ./spec/models/gateway/braintree_spec.rb:57
28) Gateway::Braintree capture should capture a previous authorization
Failure/Error: @payment.process!
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:65:in `authorize'
# ./app/models/creditcard.rb:16:in `process!'
# ./app/models/payment.rb:74:in `process!'
# ./spec/models/gateway/braintree_spec.rb:74
29) Gateway::Braintree capture raise an error if capture fails using spree interface
Failure/Error: @payment.process!
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:65:in `authorize'
# ./app/models/creditcard.rb:16:in `process!'
# ./app/models/payment.rb:74:in `process!'
# ./spec/models/gateway/braintree_spec.rb:88
30) Gateway::Braintree purchase should work through the spree payment interface with payment profiles
Failure/Error: @payment.process! # as done in PaymentsController#create
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:85:in `purchase'
# ./app/models/creditcard.rb:14:in `process!'
# ./app/models/payment.rb:74:in `process!'
# ./spec/models/gateway/braintree_spec.rb:165:in `purchase_using_spree_interface'
# ./spec/models/gateway/braintree_spec.rb:110
31) Gateway::Braintree purchase should work through the spree payment interface without payment profiles
Failure/Error: @payment.process! # as done in PaymentsController#create
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:85:in `purchase'
# ./app/models/creditcard.rb:14:in `process!'
# ./app/models/payment.rb:74:in `process!'
# ./spec/models/gateway/braintree_spec.rb:165:in `purchase_using_spree_interface'
# ./spec/models/gateway/braintree_spec.rb:117
# ./spec/models/gateway/braintree_spec.rb:183:in `with_payment_profiles_off'
# ./spec/models/gateway/braintree_spec.rb:116
32) Gateway::Braintree credit should work through the spree interface
Failure/Error: @payment.process! # as done in PaymentsController#create
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:85:in `purchase'
# ./app/models/creditcard.rb:14:in `process!'
# ./app/models/payment.rb:74:in `process!'
# ./spec/models/gateway/braintree_spec.rb:165:in `purchase_using_spree_interface'
# ./spec/models/gateway/braintree_spec.rb:127
33) Gateway::Braintree void should work through the spree creditcard / payment interface
Failure/Error: @payment.process!
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:85:in `purchase'
# ./app/models/creditcard.rb:14:in `process!'
# ./app/models/payment.rb:74:in `process!'
# ./spec/models/gateway/braintree_spec.rb:135
34) Creditcard#authorize should call authorize on the gateway with the payment amount
Failure/Error: @creditcard.authorize(100, @payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:65:in `authorize'
# ./spec/models/creditcard_spec.rb:53
35) Creditcard#authorize should log the response
Failure/Error: @creditcard.authorize(100, @payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:65:in `authorize'
# ./spec/models/creditcard_spec.rb:58
36) Creditcard#authorize if sucesssfull should store the response_code and avs_response
Failure/Error: @creditcard.authorize(100, @payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:65:in `authorize'
# ./spec/models/creditcard_spec.rb:70
37) Creditcard#authorize if sucesssfull should make payment pending
Failure/Error: @creditcard.authorize(100, @payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:65:in `authorize'
# ./spec/models/creditcard_spec.rb:76
38) Creditcard#authorize if unsucessfull should make payment failed
Failure/Error: @payment.should_receive(:fail)
(#<Payment:0x7f4c38544878>).fail(any args)
expected: 1 time
received: 0 times
# ./spec/models/creditcard_spec.rb:82
39) Creditcard#purchase should call purchase on the gateway with the payment amount
Failure/Error: @creditcard.purchase(100, @payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:85:in `purchase'
# ./spec/models/creditcard_spec.rb:94
40) Creditcard#purchase should log the response
Failure/Error: @creditcard.purchase(100, @payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:85:in `purchase'
# ./spec/models/creditcard_spec.rb:98
41) Creditcard#purchase if sucessfull should store the response_code and avs_response
Failure/Error: @creditcard.purchase(100, @payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:85:in `purchase'
# ./spec/models/creditcard_spec.rb:111
42) Creditcard#purchase if sucessfull should make payment complete
Failure/Error: @creditcard.purchase(100, @payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:85:in `purchase'
# ./spec/models/creditcard_spec.rb:117
43) Creditcard#purchase if unsucessfull should make payment failed
Failure/Error: @payment.should_receive(:fail)
(#<Payment:0x7f4c381672a0>).fail(any args)
expected: 1 time
received: 0 times
# ./spec/models/creditcard_spec.rb:123
44) Creditcard#capture when payment is pending should call capture on the gateway with the self as the authorization
Failure/Error: @creditcard.capture(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:105:in `capture'
# ./spec/models/creditcard_spec.rb:142
45) Creditcard#capture when payment is pending should log the response
Failure/Error: @creditcard.capture(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:105:in `capture'
# ./spec/models/creditcard_spec.rb:146
46) Creditcard#capture when payment is pending if sucessfull should make payment complete
Failure/Error: @creditcard.capture(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:105:in `capture'
# ./spec/models/creditcard_spec.rb:157
47) Creditcard#capture when payment is pending if sucessfull should store the response_code
Failure/Error: @creditcard.capture(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:105:in `capture'
# ./spec/models/creditcard_spec.rb:160
48) Creditcard#capture when payment is pending if unsucessfull should not make payment complete
Failure/Error: @payment.should_receive(:fail)
(#<Payment:0x7f4c38355058>).fail(any args)
expected: 1 time
received: 0 times
# ./spec/models/creditcard_spec.rb:167
49) Creditcard#void should call payment_gateway.void with the payment's response_code
Failure/Error: @creditcard.void(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:131:in `void'
# ./spec/models/creditcard_spec.rb:193
50) Creditcard#void should log the response
Failure/Error: @creditcard.void(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:131:in `void'
# ./spec/models/creditcard_spec.rb:197
51) Creditcard#void if sucessfull should update the response_code with the authorization from the gateway
Failure/Error: @creditcard.void(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:131:in `void'
# ./spec/models/creditcard_spec.rb:208
52) Creditcard#credit should log the response
Failure/Error: @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:265
53) Creditcard#credit when outstanding_balance is less than payment amount should call credit on the gateway with the credit amount and response_code
Failure/Error: @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:238
54) Creditcard#credit when outstanding_balance is equal to payment amount should call credit on the gateway with the credit amount and response_code
Failure/Error: @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:248
55) Creditcard#credit when outstanding_balance is greater than payment amount should call credit on the gateway with the original payment amount and response_code
Failure/Error: @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:258
56) Creditcard#credit when response is sucesssful should create an offsetting payment
Failure/Error: @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:278
57) Creditcard#credit when response is sucesssful resulting payment should be the supplied amount
Failure/Error: @offsetting_payment = @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:282
58) Creditcard#credit when response is sucesssful resulting payment should be in the complete state
Failure/Error: @offsetting_payment = @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:282
59) Creditcard#credit when response is sucesssful resulting payment has response_code from the transaction
Failure/Error: @offsetting_payment = @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:282
60) Creditcard#credit when response is sucesssful resulting payment has original payment as its source
Failure/Error: @offsetting_payment = @creditcard.credit(@payment)
Spree::GatewayError:
Gateway unavailable for environment - development
# ./app/models/creditcard.rb:251:in `check_environment'
# ./app/models/creditcard.rb:148:in `credit'
# ./spec/models/creditcard_spec.rb:282
61) TaxCategory shoulda validations
Failure/Error: it { should have_many(:tax_rates) }
NoMethodError:
undefined method `has_many?' for #<TaxCategory:0x7f4c37efa7b0>
# ./spec/models/tax_category_spec.rb:5
62) TaxCategory shoulda validations
Failure/Error: it { should validate_presence_of(:name) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_32::Nested_1:0x7f4c37ef8208>
# ./spec/models/tax_category_spec.rb:6
63) TaxCategory shoulda validations uniquness validation
Failure/Error: it { should validate_uniqueness_of(:name) }
NoMethodError:
undefined method `validate_uniqueness_of' for #<RSpec::Core::ExampleGroup::Nested_32::Nested_1::Nested_1:0x7f4c37667878>
# ./spec/models/tax_category_spec.rb:13
64) Taxonomy shoulda validations
Failure/Error: it {should validate_presence_of(:name) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_33::Nested_2:0x7f4c3789efd8>
# ./spec/models/taxonomy_spec.rb:10
65) Product shoulda validations
Failure/Error: it { should belong_to(:tax_category) }
NoMethodError:
undefined method `belong_to' for #<RSpec::Core::ExampleGroup::Nested_39::Nested_1:0x7f4c37d5f108>
# ./spec/models/product_spec.rb:6
66) Product shoulda validations
Failure/Error: it { should belong_to(:shipping_category) }
NoMethodError:
undefined method `belong_to' for #<RSpec::Core::ExampleGroup::Nested_39::Nested_1:0x7f4c37d5a158>
# ./spec/models/product_spec.rb:7
67) Product shoulda validations
Failure/Error: it { should have_many(:product_option_types) }
NoMethodError:
undefined method `has_many?' for #<Product:0x7f4c37d54870>
# ./spec/models/product_spec.rb:8
68) Product shoulda validations
Failure/Error: it { should have_many(:option_types) }
NoMethodError:
undefined method `has_many?' for #<Product:0x7f4c37d4f898>
# ./spec/models/product_spec.rb:9
69) Product shoulda validations
Failure/Error: it { should have_many(:product_properties) }
NoMethodError:
undefined method `has_many?' for #<Product:0x7f4c37d4a708>
# ./spec/models/product_spec.rb:10
70) Product shoulda validations
Failure/Error: it { should have_many(:properties) }
NoMethodError:
undefined method `has_many?' for #<Product:0x7f4c37d455c8>
# ./spec/models/product_spec.rb:11
71) Product shoulda validations
Failure/Error: it { should have_many(:images) }
NoMethodError:
undefined method `has_many?' for #<Product:0x7f4c37d3f0d8>
# ./spec/models/product_spec.rb:12
72) Product shoulda validations
Failure/Error: it { should have_and_belong_to_many(:product_groups) }
NoMethodError:
undefined method `has_and_belong_to_many?' for #<Product:0x7f4c37d395c0>
# ./spec/models/product_spec.rb:13
73) Product shoulda validations
Failure/Error: it { should have_and_belong_to_many(:taxons) }
NoMethodError:
undefined method `has_and_belong_to_many?' for #<Product:0x7f4c37d2f9a8>
# ./spec/models/product_spec.rb:14
74) Product shoulda validations
Failure/Error: it { should validate_presence_of(:price) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_39::Nested_1:0x7f4c37d2b6a0>
# ./spec/models/product_spec.rb:15
75) Product shoulda validations
Failure/Error: it { should validate_presence_of(:permalink) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_39::Nested_1:0x7f4c37d268a8>
# ./spec/models/product_spec.rb:16
76) ProductGroup validations
Failure/Error: it { should validate_presence_of(:name) }
NoMethodError:
undefined method `validate_presence_of' for #<RSpec::Core::ExampleGroup::Nested_40::Nested_1:0x7f4c37c75d50>
# ./spec/models/product_group_spec.rb:6
Finished in 126.91 seconds
437 examples, 76 failures, 10 pending
rake aborted!
ruby -S bundle exec rspec ./spec/controllers/content_controller_spec.rb ./spec/controllers/checkout_controller_spec.rb ./spec/controllers/admin/products_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/admin/mail_methods_controller_spec.rb ./spec/controllers/admin/orders_controller_spec.rb ./spec/controllers/orders_controller_spec.rb ./spec/lib/mail_settings_spec.rb ./spec/lib/ext_spec.rb ./spec/lib/calculated_adjustments_spec.rb ./spec/lib/mail_interceptor_spec.rb ./spec/models/shipment_spec.rb ./spec/models/mail_method_spec.rb ./spec/models/shipping_method_spec.rb ./spec/models/configuration_spec.rb ./spec/models/taxon_spec.rb ./spec/models/state_spec.rb ./spec/models/payment_method_spec.rb ./spec/models/tracer_spec.rb ./spec/models/tax_rate_spec.rb ./spec/models/inventory_unit_spec.rb ./spec/models/shipping_category_spec.rb ./spec/models/country_spec.rb ./spec/models/address_spec.rb ./spec/models/order_spec.rb ./spec/models/gateway/authorize_net_cim_spec.rb ./spec/models/gateway/braintree_spec.rb ./spec/models/gateway/authorize_net_spec.rb ./spec/models/calculator/flat_percent_item_total_spec.rb ./spec/models/product_property_spec.rb ./spec/models/creditcard_spec.rb ./spec/models/tax_category_spec.rb ./spec/models/taxonomy_spec.rb ./spec/models/adjustment_spec.rb ./spec/models/return_authorization_spec.rb ./spec/models/variant_spec.rb ./spec/models/product_scope_spec.rb ./spec/models/user_spec.rb ./spec/models/product_spec.rb ./spec/models/product_group_spec.rb ./spec/models/product_option_type_spec.rb ./spec/models/line_item_spec.rb ./spec/models/payment_spec.rb failed
(See full trace by running task with --trace)
########################### dash #########################
rm dash/Gemfile*
cd dash && /var/lib/gems/1.8/bin/rake test_app
(in /home/amw/spree/dash)
run rails new test_app --database=sqlite3 -GJTq --skip-gemfile from "./spec"
run rake spree_core:install from "./test_app"
(in /home/amw/spree/dash/spec/test_app)
run rake spree_dash:install from "./test_app"
(in /home/amw/spree/dash/spec/test_app)
INFO: Mirroring assets from /home/amw/spree/dash/lib/tasks/../../public to /home/amw/spree/dash/spec/test_app/public
Couldn't drop db/test.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/dash/spec/test_app/db/test.sqlite3>
Couldn't drop db/cucumber.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/dash/spec/test_app/db/cucumber.sqlite3>
cd dash && /var/lib/gems/1.8/bin/rake spec
(in /home/amw/spree/dash)
/usr/bin/ruby1.8 -S bundle exec rspec ./spec/controllers/admin/overview_controller_spec.rb
..
Finished in 0.11732 seconds
2 examples, 0 failures
########################### promo #########################
rm promo/Gemfile*
cd promo && /var/lib/gems/1.8/bin/rake test_app
(in /home/amw/spree/promo)
run rails new test_app --database=sqlite3 -GJTq --skip-gemfile from "./spec"
run rake spree_core:install from "./test_app"
(in /home/amw/spree/promo/spec/test_app)
run rake spree_promo:install from "./test_app"
(in /home/amw/spree/promo/spec/test_app)
INFO: Mirroring assets from /home/amw/spree/promo/lib/tasks/../../public to /home/amw/spree/promo/spec/test_app/public
run rake spree_auth:install from "./test_app"
(in /home/amw/spree/promo/spec/test_app)
Couldn't drop db/test.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/promo/spec/test_app/db/test.sqlite3>
Couldn't drop db/cucumber.sqlite3 : #<Errno::ENOENT: No such file or directory - /home/amw/spree/promo/spec/test_app/db/cucumber.sqlite3>
cd promo && /var/lib/gems/1.8/bin/rake spec
(in /home/amw/spree/promo)
/usr/bin/ruby1.8 -S bundle exec rspec ./spec/models/promotion_spec.rb ./spec/models/promotion/rules/first_order_spec.rb ./spec/models/promotion/rules/item_total_spec.rb ./spec/models/promotion/rules/user_spec.rb ./spec/models/promotion/rules/product_spec.rb ./spec/models/promotion_rule_spec.rb
.........................................
Finished in 0.45802 seconds
41 examples, 0 failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment