Created
February 11, 2010 17:36
-
-
Save kevinansfield/301733 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imac-home ~/code/rails/3rdparty/subscriptions (master): rake spec | |
(in /Users/kev/code/rails/3rdparty/subscriptions) | |
.................................F.FF.........F.......F..........FF......................................................FF....................F..FFF.FFF.................................................. | |
1) | |
Mocha::ExpectationError in 'Subscription when charging should record the payment when charging paid accounts' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<SubscriptionPayment:0x105e03188>].create(:amount => #<BigDecimal:0x105e2b188>, :transaction_id => '411', :account => #<Account:0x105e28f28>) | |
satisfied expectations: | |
- allowed any number of times, already invoked once: #<Subscription:0x105e33e00>.gateway(any_parameters) | |
- expected exactly once, already invoked once: #<ActiveMerchant::Billing::BogusGateway:0x105e318d0>.purchase(#<BigDecimal:0x105e2fa08>, 'foo') | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/models/subscription_spec.rb:508: | |
2) | |
'Subscription when switching plans should refuse switching to a plan with a user limit less than the current number of users' FAILED | |
expected true to be false | |
./spec/models/subscription_spec.rb:456: | |
3) | |
Mocha::ExpectationError in 'Subscription when switching plans should allow switching to a plan with a user limit greater than the current number of users' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<User:0x105d4cb90>, #<User:0x105d4caf0>].count(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/models/subscription_spec.rb:462: | |
4) | |
Mocha::ExpectationError in 'Subscription when storing the credit card successfully subsequent times should record the charge with no renewal date' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<SubscriptionPayment:0x105ec3cd0>].build(has_entry(:amount => #<BigDecimal:0x105ef68b0>)) | |
satisfied expectations: | |
- expected exactly once, already invoked once: #<Subscription:0x105f0dad8>.save(any_parameters) | |
- expected exactly once, already invoked once: #<Subscription:0x105f0dad8>.state=('active') | |
- expected exactly once, already invoked once: #<Subscription:0x105f0dad8>.card_expiration=('05-2012') | |
- expected exactly once, already invoked once: #<Subscription:0x105f0dad8>.card_number=('1111') | |
- allowed any number of times, already invoked twice: #<Subscription:0x105f0dad8>.gateway(any_parameters) | |
- allowed any number of times, already invoked once: #<Mock:CreditCard>.display_number(any_parameters) | |
- allowed any number of times, already invoked twice: #<Mock:CreditCard>.expiry_date(any_parameters) | |
- allowed any number of times, already invoked 8 times: Time.now(any_parameters) | |
- expected exactly once, already invoked once: #<ActiveMerchant::Billing::BogusGateway:0x105f09aa0>.purchase(1000, '123') | |
- allowed any number of times, not yet invoked: #<ActiveMerchant::Billing::BogusGateway:0x105f09aa0>.purchase(any_parameters) | |
- allowed any number of times, already invoked once: #<ActiveMerchant::Billing::BogusGateway:0x105f09aa0>.update(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/models/subscription_spec.rb:371: | |
5) | |
Mocha::ExpectationError in 'Subscription when storing the credit card successfully for the first time should record the charge with no renewal date' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<SubscriptionPayment:0x105c91d68>].build(has_entry(:amount => #<BigDecimal:0x105ca0728>)) | |
satisfied expectations: | |
- expected exactly once, already invoked once: #<Subscription:0x105cac050>.save(any_parameters) | |
- expected exactly once, already invoked once: #<Subscription:0x105cac050>.state=('active') | |
- expected exactly once, already invoked once: #<Subscription:0x105cac050>.card_expiration=('05-2012') | |
- expected exactly once, already invoked once: #<Subscription:0x105cac050>.card_number=('1111') | |
- allowed any number of times, already invoked twice: #<Subscription:0x105cac050>.gateway(any_parameters) | |
- allowed any number of times, already invoked once: #<Mock:CreditCard>.display_number(any_parameters) | |
- allowed any number of times, already invoked twice: #<Mock:CreditCard>.expiry_date(any_parameters) | |
- allowed any number of times, already invoked 8 times: Time.now(any_parameters) | |
- expected exactly once, already invoked once: #<ActiveMerchant::Billing::BogusGateway:0x105ca9eb8>.purchase(1000, '123') | |
- allowed any number of times, already invoked once: #<ActiveMerchant::Billing::BogusGateway:0x105ca9eb8>.store(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/models/subscription_spec.rb:329: | |
6) | |
Mocha::ExpectationError in 'Subscription when being created with a credit card storing the card without a trial period should record the charge with the setup amount' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<SubscriptionPayment:0x105b38340>].build(has_entries({:setup => true, :amount => #<BigDecimal:0x105b42ea8>})) | |
satisfied expectations: | |
- allowed any number of times, already invoked twice: #<Subscription:0x105b4d7b8>.gateway(any_parameters) | |
- allowed any number of times, already invoked 3 times: Time.now(any_parameters) | |
- expected exactly once, already invoked once: #<ActiveMerchant::Billing::BogusGateway:0x105b48b78>.purchase(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/models/subscription_spec.rb:207: | |
7) | |
Mocha::ExpectationError in 'Subscription when being created with a credit card storing the card without a trial period should record the charge with the plan amount' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<SubscriptionPayment:0x105b04478>].build(has_entries({:setup => false, :amount => #<BigDecimal:0x105b0f940>})) | |
satisfied expectations: | |
- allowed any number of times, already invoked twice: #<Subscription:0x105b1d860>.gateway(any_parameters) | |
- allowed any number of times, already invoked 3 times: Time.now(any_parameters) | |
- expected exactly once, already invoked once: #<ActiveMerchant::Billing::BogusGateway:0x105b18cc0>.purchase(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/models/subscription_spec.rb:213: | |
8) | |
Mocha::ExpectationError in 'Account when checking for a qualifying subscription plan against the user limit should qualify if the plan has a user limit greater than or equal to the number of users' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<User:0x105bcd738>, #<User:0x105bcd698>].count(any_parameters) | |
- expected exactly once, not yet invoked: [#<User:0x105bcd738>, #<User:0x105bcd698>].count(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/models/account_spec.rb:198: | |
9) | |
'Account when checking for a qualifying subscription plan against the user limit should not qualify if the plan has a user limit less than the number of users' FAILED | |
expected true to be false | |
./spec/models/account_spec.rb:204: | |
10) | |
'Account should indicate the user limit has been reached when the number of active positions equals the user limit' FAILED | |
expected false to be true | |
./spec/models/account_spec.rb:88: | |
11) | |
'UsersController with admin users should allow viewing the index' FAILED | |
expected: [], | |
got: [#<User id: 2129706640, login: "aaron", email: "[email protected]", name: nil, remember_token: nil, crypted_password: "00742970dc9e6319f8019fd54864d3ea740f04b1", salt: "7e3041ebc2fc05a40c60028e2c4901a81035d3cd", remember_token_expires_at: nil, updated_at: "2010-02-11 17:33:40", created_at: "2010-02-10 17:33:39", account_id: 516032548, admin: false>, #<User id: 1266334883, login: "quentin", email: "[email protected]", name: nil, remember_token: nil, crypted_password: "00742970dc9e6319f8019fd54864d3ea740f04b1", salt: "7e3041ebc2fc05a40c60028e2c4901a81035d3cd", remember_token_expires_at: nil, updated_at: "2010-02-11 17:33:40", created_at: "2010-02-06 17:33:39", account_id: 516032548, admin: true>] (using ==) | |
./spec/controllers/users_controller_spec.rb:57: | |
12) | |
'UsersController with admin users should allow adding users' FAILED | |
expected: #<User id: nil, login: nil, email: nil, name: nil, remember_token: nil, crypted_password: nil, salt: nil, remember_token_expires_at: nil, updated_at: nil, created_at: nil, account_id: nil, admin: false>, | |
got: #<User id: nil, login: nil, email: nil, name: nil, remember_token: nil, crypted_password: nil, salt: nil, remember_token_expires_at: nil, updated_at: nil, created_at: nil, account_id: 516032548, admin: false> (using ==) | |
./spec/controllers/users_controller_spec.rb:63: | |
13) | |
Mocha::ExpectationError in 'UsersController with admin users should allow creating users' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<User:0x105c91098>, #<User:0x105c90ff8>, #<User:0x105c7f550>].build('name' => 'Bubba', 'password_confirmation' => 'foobar', 'password' => 'foobar', 'login' => 'foobar', 'email' => '[email protected]') | |
- expected exactly once, not yet invoked: #<User:0x105c8f2c0>.save(any_parameters) | |
satisfied expectations: | |
- allowed any number of times, already invoked 3 times: #<UsersController:0x105c9cf60>.current_user(any_parameters) | |
- allowed any number of times, already invoked 3 times: #<UsersController:0x105c9cf60>.current_account(any_parameters) | |
- allowed any number of times, already invoked once: #<Account:0x105c99298>.reached_user_limit?(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/controllers/users_controller_spec.rb:68: | |
14) | |
Mocha::ExpectationError in 'UsersController with admin users should allow updating users' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<User:0x105bf47e8>, #<User:0x105bf46a8>].find('1266334883') | |
- expected exactly once, not yet invoked: #<User:0x105bfed10>.update_attributes('name' => 'Bubba', 'password_confirmation' => 'foobar', 'password' => 'foobar', 'login' => 'foobar', 'email' => '[email protected]') | |
satisfied expectations: | |
- allowed any number of times, already invoked 3 times: #<UsersController:0x105c05098>.current_user(any_parameters) | |
- allowed any number of times, already invoked once: #<UsersController:0x105c05098>.current_account(any_parameters) | |
- allowed any number of times, not yet invoked: #<Account:0x105c016a0>.reached_user_limit?(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/controllers/users_controller_spec.rb:81: | |
15) | |
Mocha::ExpectationError in 'UsersController with admin users should prevent creating users when the user limit has been reached' | |
not all expectations were satisfied | |
unsatisfied expectations: | |
- expected exactly once, not yet invoked: [#<User:0x105b8e470>, #<User:0x105b8e3d0>, #<User:0x105f49600>].build(any_parameters) | |
satisfied expectations: | |
- allowed any number of times, already invoked 3 times: #<UsersController:0x105b9a7c0>.current_user(any_parameters) | |
- allowed any number of times, already invoked 3 times: #<UsersController:0x105b9a7c0>.current_account(any_parameters) | |
- expected exactly once, already invoked once: #<Account:0x105b96d28>.reached_user_limit?(any_parameters) | |
- allowed any number of times, not yet invoked: #<Account:0x105b96d28>.reached_user_limit?(any_parameters) | |
- expected never, not yet invoked: #<User:0x105b8c670>.save(any_parameters) | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `send' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:221:in `method_missing' | |
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:371:in `method_missing_without_paginate' | |
/Users/kev/code/rails/3rdparty/subscriptions/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' | |
./spec/controllers/users_controller_spec.rb:89: | |
16) | |
'UsersController with normal users should allow viewing the index' FAILED | |
expected: [], | |
got: [#<User id: 2129706640, login: "aaron", email: "[email protected]", name: nil, remember_token: nil, crypted_password: "00742970dc9e6319f8019fd54864d3ea740f04b1", salt: "7e3041ebc2fc05a40c60028e2c4901a81035d3cd", remember_token_expires_at: nil, updated_at: "2010-02-11 17:33:40", created_at: "2010-02-10 17:33:39", account_id: 516032548, admin: false>, #<User id: 1266334883, login: "quentin", email: "[email protected]", name: nil, remember_token: nil, crypted_password: "00742970dc9e6319f8019fd54864d3ea740f04b1", salt: "7e3041ebc2fc05a40c60028e2c4901a81035d3cd", remember_token_expires_at: nil, updated_at: "2010-02-11 17:33:40", created_at: "2010-02-06 17:33:39", account_id: 516032548, admin: true>] (using ==) | |
./spec/controllers/users_controller_spec.rb:23: | |
Finished in 2.093967 seconds | |
203 examples, 16 failures | |
rake aborted! | |
Command /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib" "/Library/Ruby/Gems/1.8/gems/rspec-1.3.0/bin/spec" "spec/controllers/accounts_controller_spec.rb" "spec/controllers/sessions_controller_spec.rb" "spec/controllers/subscription_admin/accounts_controller_spec.rb" "spec/controllers/subscription_admin/subscription_discounts_controller_spec.rb" "spec/controllers/subscription_admin/subscription_plans_controller_spec.rb" "spec/controllers/users_controller_spec.rb" "spec/models/account_spec.rb" "spec/models/password_reset_spec.rb" "spec/models/subscription_discount_spec.rb" "spec/models/subscription_plan_spec.rb" "spec/models/subscription_spec.rb" "spec/models/user_spec.rb" "spec/views/accounts/edit.html.erb_spec.rb" "spec/views/accounts/new.html.erb_spec.rb" "spec/views/users/new.html.erb_spec.rb" --options "/Users/kev/code/rails/3rdparty/subscriptions/spec/spec.opts" failed | |
(See full trace by running task with --trace) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment