Created
July 26, 2013 19:00
-
-
Save soulcutter/6091375 to your computer and use it in GitHub Desktop.
Weird stubbing error
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
Order rejecting an order sends reject email when status is updated | |
Failure/Error: Order.new.stub(:send_reject_email) | |
NoMethodError: | |
undefined method `method_defined?' for #<Order not initialized> | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/activemodel-4.0.0/lib/active_model/attribute_methods.rb:436:in `method_missing' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/activerecord-4.0.0/lib/active_record/attribute_methods.rb:128:in `method_missing' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks/instance_method_stasher.rb:34:in `method_defined_on_klass?' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks/instance_method_stasher.rb:55:in `method_owned_by_klass?' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks/instance_method_stasher.rb:29:in `method_defined_directly_on_klass?' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks/instance_method_stasher.rb:19:in `stash' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks/method_double.rb:164:in `configure_method' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks/method_double.rb:237:in `add_stub' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks/proxy.rb:95:in `add_stub' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks.rb:48:in `allow_message' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-mocks-2.14.1/lib/rspec/mocks/syntax.rb:29:in `stub' | |
# ./spec/models/order_spec.rb:28:in `block (3 levels) in <top (required)>' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example.rb:114:in `instance_eval' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example.rb:114:in `block in run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example.rb:179:in `call' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example.rb:179:in `run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example.rb:247:in `instance_eval_with_args' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/hooks.rb:87:in `block (2 levels) in run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/hooks.rb:89:in `call' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/hooks.rb:89:in `run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/hooks.rb:427:in `run_hook' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example_group.rb:339:in `run_around_each_hooks' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example.rb:256:in `with_around_each_hooks' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example.rb:111:in `run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example_group.rb:400:in `block in run_examples' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example_group.rb:396:in `map' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example_group.rb:396:in `run_examples' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example_group.rb:381:in `run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example_group.rb:382:in `block in run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example_group.rb:382:in `map' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/example_group.rb:382:in `run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/command_line.rb:28:in `map' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/command_line.rb:28:in `block in run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/reporter.rb:58:in `report' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/command_line.rb:25:in `run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/runner.rb:80:in `run' | |
# /Users/matt/.rvm/gems/ruby-2.0.0-p247@uncommon-flow/gems/rspec-core-2.14.2/lib/rspec/core/runner.rb:17:in `block in autorun' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment