Skip to content

Instantly share code, notes, and snippets.

@jrafanie
Created December 15, 2015 22:41
Show Gist options
  • Save jrafanie/570aa8a80f78a2b51b61 to your computer and use it in GitHub Desktop.
Save jrafanie/570aa8a80f78a2b51b61 to your computer and use it in GitHub Desktop.
rspec-mocks at b94e242ebbc5 fails to redefine methods/super method in ruby 2.3-preview2
05:29:41 ~/Code/rspec-mocks (master) (2.3.0-preview2) + be rake spec
/Users/joerafaniello/.rubies/ruby-2.3.0-preview2/bin/ruby -w -I/Users/joerafaniello/Code/rspec-core/lib:/Users/joerafaniello/Code/rspec-support/lib /Users/joerafaniello/Code/rspec-core/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --color
Run options:
include {:focus=>true}
exclude {:ordered_and_vague_counts_unsupported=>true}
All examples were filtered out; ignoring {:focus=>true}
Randomized with seed 438
....................................................................................................................................................................................................................................................................................*...................................................................................................................................................................../Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old method_with_default_argument
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/double_spec.rb:254: warning: previous definition of method_with_default_argument was here
F............................................................................................................................................................................................................................................/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old existing_class_method
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:7: warning: previous definition of existing_class_method was here
F../Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old existing_private_class_method
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:13: warning: previous definition of existing_private_class_method was here
F./Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old method_b
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:336: warning: previous definition of method_b was here
F./Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old say_hello
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:257: warning: previous definition of say_hello was here
F...../Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old value
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:180: warning: previous definition of value was here
F./Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old value
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:159: warning: previous definition of value was here
F................................*................................................................................................................................................................./Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_implementation_spec.rb:32: warning: previous definition of foo was here
F/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_implementation_spec.rb:49: warning: previous definition of foo was here
F/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_implementation_spec.rb:40: warning: previous definition of foo was here
F..../Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stash_spec.rb:6: warning: previous definition of foo was here
F.................................................................................................................................................................*........................../Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:273: warning: previous definition of foo was here
/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:272: warning: previous definition of foo was here
/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:274: warning: previous definition of foo was here
F/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:272: warning: previous definition of foo was here
F/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:272: warning: previous definition of foo was here
F/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:272: warning: previous definition of foo was here
F................................................*..............................*........**.................................................................................................................................................................................................................................................................................................../Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old new
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/partial_double_spec.rb:519: warning: previous definition of new was here
F............................./Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/and_call_original_spec.rb:148: warning: previous definition of foo was here
F/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/and_call_original_spec.rb:85: warning: previous definition of foo was here
F/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/and_call_original_spec.rb:78: warning: previous definition of foo was here
F..../Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old perform
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/and_call_original_spec.rb:258: warning: previous definition of perform was here
F.................................../Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/should_syntax_spec.rb:103: warning: previous definition of foo was here
F./Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/should_syntax_spec.rb:94: warning: previous definition of foo was here
F./Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/should_syntax_spec.rb:86: warning: previous definition of foo was here
F.......................................................................................................
Pending: (Failures listed here are expected and do not affect your suite's status)
1) Reraising eager raises during the verify step when an expectation is called out of order reraises during verification
# Says bar was called 0 times when it was, see: http://git.io/pjTq
Failure/Error: expect { verify_all }.to fail_with(/received :bar out of order/)
expected RSpec::Mocks::MockExpectationError with message matching /received :bar out of order/ but nothing was raised
# ./spec/rspec/mocks/reraising_eager_raises_spec.rb:105:in `block (4 levels) in <top (required)>'
# ./spec/spec_helper.rb:45:in `with_unfulfilled_double'
# ./spec/rspec/mocks/reraising_eager_raises_spec.rb:100:in `block (3 levels) in <top (required)>'
2) RSpec::Mocks::Double#and_yield with eval context as block argument and yielded arguments that are optional yields the default argument when the argument is not given
# Not sure how to achieve this yet. See rspec/rspec-mocks#714 and rspec/rspec-support#85.
Got 2 failures:
2.1) Failure/Error: eval("object.a_message { |receiver=default_arg| receiver.bar }")
#<Object:0x007fb7d808a880> yielded || to block with arity of 1
# ./spec/rspec/mocks/and_yield_spec.rb:111:in `eval'
# (eval):1:in `block (6 levels) in <top (required)>'
# ./spec/rspec/mocks/and_yield_spec.rb:111:in `eval'
# ./spec/rspec/mocks/and_yield_spec.rb:111:in `block (6 levels) in <top (required)>'
2.2) Failure/Error: expect(default_arg).to receive(:bar)
(#<Object:0x007fb7d808a8f8>).bar(*(any args))
expected: 1 time with any arguments
received: 0 times with any arguments
# ./spec/rspec/mocks/and_yield_spec.rb:109:in `block (6 levels) in <top (required)>'
3) RSpec::Mocks::Matchers::Receive expect_any_instance_of(...).to receive behaves like an expect syntax expectation reports the line number of expectation of unreceived message
# No reason given
Failure/Error:
expect {
verify_all
}.to raise_error { |e|
expect(e.backtrace.first).to match(/#{File.basename(__FILE__)}:#{expected_error_line}/)
}
expected "/Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:87:in `block in <module:Support>'" to match /receive_spec.rb:159/
Diff:
@@ -1,2 +1,2 @@
-/receive_spec.rb:159/
+"/Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:87:in `block in <module:Support>'"
Shared Example Group: "an expect syntax expectation" called from ./spec/rspec/mocks/matchers/receive_spec.rb:450
# ./spec/rspec/mocks/matchers/receive_spec.rb:161:in `block (3 levels) in <module:Mocks>'
4) receive_message_chain with only the expect syntax enabled fails with and_call_original when the entire chain is not called
# See https://github.com/rspec/rspec-mocks/pull/467#issuecomment-28631621
Got 2 failures:
4.1) Failure/Error: expect(list).to receive_message_chain(:to_a, :length).and_call_original
#<Double (anonymous)> is a pure test double. `and_call_original` is only available on a partial double.
# ./spec/rspec/mocks/matchers/receive_message_chain_spec.rb:75:in `block (3 levels) in <module:Matchers>'
4.2) Failure/Error: expect(list).to receive_message_chain(:to_a, :length).and_call_original
([1, 2, 3]).to_a(*(any args))
expected: 1 time with any arguments
received: 0 times with any arguments
# ./spec/rspec/mocks/matchers/receive_message_chain_spec.rb:75:in `block (3 levels) in <module:Matchers>'
5) receive_message_chain with only the expect syntax enabled works with and_call_original
# See https://github.com/rspec/rspec-mocks/pull/467#issuecomment-28631621
Got 2 failures:
5.1) Failure/Error: expect(list).to receive_message_chain(:to_a, :length).and_call_original
#<Double (anonymous)> is a pure test double. `and_call_original` is only available on a partial double.
# ./spec/rspec/mocks/matchers/receive_message_chain_spec.rb:69:in `block (3 levels) in <module:Matchers>'
5.2) Failure/Error: expect(list).to receive_message_chain(:to_a, :length).and_call_original
([1, 2, 3]).to_a(*(any args))
expected: 1 time with any arguments
received: 0 times with any arguments
# ./spec/rspec/mocks/matchers/receive_message_chain_spec.rb:69:in `block (3 levels) in <module:Matchers>'
6) #any_instance invocation order when setting a message expectation raises an error if 'with' follows 'and_return'
# see Github issue #42
Got 2 failures:
6.1) Failure/Error: expect { expect_any_instance_of(klass).to receive(:foo).and_return(1).with("1") }.to raise_error(NoMethodError)
expected NoMethodError but nothing was raised
# ./spec/rspec/mocks/any_instance_spec.rb:37:in `block (4 levels) in <module:Mocks>'
6.2) Failure/Error: DEFAULT_FAILURE_NOTIFIER = lambda { |failure, _opts| raise failure }
Exactly one instance should have received the following message(s) but didn't: foo
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:87:in `block in <module:Support>'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:96:in `notify_failure'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/error_generator.rb:325:in `notify'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/error_generator.rb:309:in `__raise'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb:7:in `raise_second_instance_received_message_error'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/any_instance/recorder.rb:94:in `verify'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `block in verify_all'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `each_value'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `verify_all'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks.rb:45:in `verify'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/mocking_adapters/rspec.rb:23:in `verify_mocks_for_rspec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:491:in `verify_mocks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:485:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
7) #any_instance invocation order when setting a message expectation raises an error if 'with' follows 'and_raise'
# see Github issue #42
Got 2 failures:
7.1) Failure/Error: expect { expect_any_instance_of(klass).to receive(:foo).and_raise(1).with("1") }.to raise_error(NoMethodError)
expected NoMethodError but nothing was raised
# ./spec/rspec/mocks/any_instance_spec.rb:42:in `block (4 levels) in <module:Mocks>'
7.2) Failure/Error: DEFAULT_FAILURE_NOTIFIER = lambda { |failure, _opts| raise failure }
Exactly one instance should have received the following message(s) but didn't: foo
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:87:in `block in <module:Support>'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:96:in `notify_failure'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/error_generator.rb:325:in `notify'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/error_generator.rb:309:in `__raise'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb:7:in `raise_second_instance_received_message_error'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/any_instance/recorder.rb:94:in `verify'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `block in verify_all'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `each_value'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `verify_all'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks.rb:45:in `verify'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/mocking_adapters/rspec.rb:23:in `verify_mocks_for_rspec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:491:in `verify_mocks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:485:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
Failures:
1) RSpec::Mocks::Double with a method that has a default argument raises an exception if the arguments don't match when the method is called, correctly reporting the offending arguments
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old method_with_default_argument
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/double_spec.rb:254: warning: previous definition of method_with_default_argument was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
2) A method stub #rspec_reset restores existing class methods
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old existing_class_method
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:7: warning: previous definition of existing_class_method was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
3) A method stub #rspec_reset restores existing private class methods
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old existing_private_class_method
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:13: warning: previous definition of existing_private_class_method was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
4) A method stub #rspec_reset correctly handles stubbing inherited mixed in class methods
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old method_b
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:336: warning: previous definition of method_b was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
5) A method stub #rspec_reset restores existing singleton methods with the appropriate context
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old say_hello
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:257: warning: previous definition of say_hello was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
6) A method stub stubbing with prepend does not unnecessarily prepend a module when the module was included
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old value
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:180: warning: previous definition of value was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
7) A method stub stubbing with prepend does not unnecessarily prepend a module when the prepended module does not override the stubbed method
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old value
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_spec.rb:159: warning: previous definition of value was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
8) unstubbing with `and_call_original` replaces the stubbed method with the original method
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_implementation_spec.rb:32: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
9) unstubbing with `and_call_original` does not remove any expectations with the same method name
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_implementation_spec.rb:49: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
10) unstubbing with `and_call_original` removes all stubs with the supplied method name
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stub_implementation_spec.rb:40: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
11) only stashing the original method keeps the original method intact after multiple expectations are added on the same method
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/stash_spec.rb:6: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
12) RSpec::Mocks::Matchers::Receive allow(...).to receive on a class method, from a class with subclasses can stub the same method simultaneously in the superclass and subclasses
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:273: warning: previous definition of foo was here
/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:272: warning: previous definition of foo was here
/Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:274: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
13) RSpec::Mocks::Matchers::Receive allow(...).to receive on a class method, from a class with subclasses creates stub which can be called using `super` in a subclass
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:272: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
14) RSpec::Mocks::Matchers::Receive allow(...).to receive on a class method, from a class with subclasses if the method is not redefined in the subclass stubs the method in the subclass
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:272: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
15) RSpec::Mocks::Matchers::Receive allow(...).to receive on a class method, from a class with subclasses if the method is redefined in the subclass does not stub the method in the subclass
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/matchers/receive_spec.rb:272: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
16) when verify_partial_doubles configuration option is set when `.new` is stubbed on a class that has redefined `new` uses the method signature of the redefined `new` for arg verification
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old new
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/partial_double_spec.rb:519: warning: previous definition of new was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
17) and_call_original on a partial double when a class method is stubbed in the superclass still works for class methods defined on a superclass
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/and_call_original_spec.rb:148: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
18) and_call_original on a partial double for singleton methods works for SimpleDelegator subclasses
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/and_call_original_spec.rb:85: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
19) and_call_original on a partial double for singleton methods works
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/and_call_original_spec.rb:78: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
20) and_call_original on a partial double that overrides #method works for a singleton method
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old perform
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/and_call_original_spec.rb:258: warning: previous definition of perform was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
21) Using the legacy should syntax #unstub does not remove any expectations with the same method name
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/should_syntax_spec.rb:103: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
22) Using the legacy should syntax #unstub removes all stubs with the supplied method name
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/should_syntax_spec.rb:94: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
23) Using the legacy should syntax #unstub replaces the stubbed method with the original method
Failure/Error: raise "Warnings were generated: #{output}" if has_output?
RuntimeError:
Warnings were generated: /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/method_double.rb:63: warning: method redefined; discarding old foo
/Users/joerafaniello/Code/rspec-mocks/spec/rspec/mocks/should_syntax_spec.rb:86: warning: previous definition of foo was here
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec/stderr_splitter.rb:54:in `verify_no_warnings!'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support/spec.rb:25:in `block (2 levels) in <top (required)>'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:424:in `instance_exec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:364:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:521:in `block in run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:520:in `run_owned_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:607:in `block in run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `each'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:606:in `run_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:477:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:484:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
Finished in 1.83 seconds (files took 0.44156 seconds to load)
1651 examples, 23 failures, 7 pending
Failed examples:
rspec ./spec/rspec/mocks/double_spec.rb:253 # RSpec::Mocks::Double with a method that has a default argument raises an exception if the arguments don't match when the method is called, correctly reporting the offending arguments
rspec ./spec/rspec/mocks/stub_spec.rb:281 # A method stub #rspec_reset restores existing class methods
rspec ./spec/rspec/mocks/stub_spec.rb:288 # A method stub #rspec_reset restores existing private class methods
rspec ./spec/rspec/mocks/stub_spec.rb:323 # A method stub #rspec_reset correctly handles stubbing inherited mixed in class methods
rspec ./spec/rspec/mocks/stub_spec.rb:255 # A method stub #rspec_reset restores existing singleton methods with the appropriate context
rspec ./spec/rspec/mocks/stub_spec.rb:178 # A method stub stubbing with prepend does not unnecessarily prepend a module when the module was included
rspec ./spec/rspec/mocks/stub_spec.rb:157 # A method stub stubbing with prepend does not unnecessarily prepend a module when the prepended module does not override the stubbed method
rspec ./spec/rspec/mocks/stub_implementation_spec.rb:30 # unstubbing with `and_call_original` replaces the stubbed method with the original method
rspec ./spec/rspec/mocks/stub_implementation_spec.rb:47 # unstubbing with `and_call_original` does not remove any expectations with the same method name
rspec ./spec/rspec/mocks/stub_implementation_spec.rb:38 # unstubbing with `and_call_original` removes all stubs with the supplied method name
rspec ./spec/rspec/mocks/stash_spec.rb:12 # only stashing the original method keeps the original method intact after multiple expectations are added on the same method
rspec ./spec/rspec/mocks/matchers/receive_spec.rb:298 # RSpec::Mocks::Matchers::Receive allow(...).to receive on a class method, from a class with subclasses can stub the same method simultaneously in the superclass and subclasses
rspec ./spec/rspec/mocks/matchers/receive_spec.rb:293 # RSpec::Mocks::Matchers::Receive allow(...).to receive on a class method, from a class with subclasses creates stub which can be called using `super` in a subclass
rspec ./spec/rspec/mocks/matchers/receive_spec.rb:286 # RSpec::Mocks::Matchers::Receive allow(...).to receive on a class method, from a class with subclasses if the method is not redefined in the subclass stubs the method in the subclass
rspec ./spec/rspec/mocks/matchers/receive_spec.rb:278 # RSpec::Mocks::Matchers::Receive allow(...).to receive on a class method, from a class with subclasses if the method is redefined in the subclass does not stub the method in the subclass
rspec ./spec/rspec/mocks/partial_double_spec.rb:517 # when verify_partial_doubles configuration option is set when `.new` is stubbed on a class that has redefined `new` uses the method signature of the redefined `new` for arg verification
rspec ./spec/rspec/mocks/and_call_original_spec.rb:147 # and_call_original on a partial double when a class method is stubbed in the superclass still works for class methods defined on a superclass
rspec ./spec/rspec/mocks/and_call_original_spec.rb:83 # and_call_original on a partial double for singleton methods works for SimpleDelegator subclasses
rspec ./spec/rspec/mocks/and_call_original_spec.rb:77 # and_call_original on a partial double for singleton methods works
rspec ./spec/rspec/mocks/and_call_original_spec.rb:257 # and_call_original on a partial double that overrides #method works for a singleton method
rspec ./spec/rspec/mocks/should_syntax_spec.rb:101 # Using the legacy should syntax #unstub does not remove any expectations with the same method name
rspec ./spec/rspec/mocks/should_syntax_spec.rb:92 # Using the legacy should syntax #unstub removes all stubs with the supplied method name
rspec ./spec/rspec/mocks/should_syntax_spec.rb:84 # Using the legacy should syntax #unstub replaces the stubbed method with the original method
Randomized with seed 438
05:29:15 ~/Code/rspec-mocks (master) (2.2.3) + be rake spec
/Users/joerafaniello/.rubies/ruby-2.2.3/bin/ruby -w -I/Users/joerafaniello/Code/rspec-core/lib:/Users/joerafaniello/Code/rspec-support/lib /Users/joerafaniello/Code/rspec-core/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --color
Run options:
include {:focus=>true}
exclude {:ordered_and_vague_counts_unsupported=>true}
All examples were filtered out; ignoring {:focus=>true}
Randomized with seed 29581
..............................................................................................................................................................................................................................................................................*...........*..............................................................................................................................................................*........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*..................................................................................................................................................................................................................................................................................**...............................................................................................................................................................................................................................................*............................................
Pending: (Failures listed here are expected and do not affect your suite's status)
1) receive_message_chain with only the expect syntax enabled fails with and_call_original when the entire chain is not called
# See https://github.com/rspec/rspec-mocks/pull/467#issuecomment-28631621
Got 2 failures:
1.1) Failure/Error: expect(list).to receive_message_chain(:to_a, :length).and_call_original
#<Double (anonymous)> is a pure test double. `and_call_original` is only available on a partial double.
# ./spec/rspec/mocks/matchers/receive_message_chain_spec.rb:75:in `block (3 levels) in <module:Matchers>'
1.2) Failure/Error: expect(list).to receive_message_chain(:to_a, :length).and_call_original
([1, 2, 3]).to_a(*(any args))
expected: 1 time with any arguments
received: 0 times with any arguments
# ./spec/rspec/mocks/matchers/receive_message_chain_spec.rb:75:in `block (3 levels) in <module:Matchers>'
2) receive_message_chain with only the expect syntax enabled works with and_call_original
# See https://github.com/rspec/rspec-mocks/pull/467#issuecomment-28631621
Got 2 failures:
2.1) Failure/Error: expect(list).to receive_message_chain(:to_a, :length).and_call_original
#<Double (anonymous)> is a pure test double. `and_call_original` is only available on a partial double.
# ./spec/rspec/mocks/matchers/receive_message_chain_spec.rb:69:in `block (3 levels) in <module:Matchers>'
2.2) Failure/Error: expect(list).to receive_message_chain(:to_a, :length).and_call_original
([1, 2, 3]).to_a(*(any args))
expected: 1 time with any arguments
received: 0 times with any arguments
# ./spec/rspec/mocks/matchers/receive_message_chain_spec.rb:69:in `block (3 levels) in <module:Matchers>'
3) RSpec::Mocks::Matchers::Receive expect_any_instance_of(...).to receive behaves like an expect syntax expectation reports the line number of expectation of unreceived message
# No reason given
Failure/Error:
expect {
verify_all
}.to raise_error { |e|
expect(e.backtrace.first).to match(/#{File.basename(__FILE__)}:#{expected_error_line}/)
}
expected "/Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:87:in `block in <module:Support>'" to match /receive_spec.rb:159/
Diff:
@@ -1,2 +1,2 @@
-/receive_spec.rb:159/
+"/Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:87:in `block in <module:Support>'"
Shared Example Group: "an expect syntax expectation" called from ./spec/rspec/mocks/matchers/receive_spec.rb:450
# ./spec/rspec/mocks/matchers/receive_spec.rb:161:in `block (3 levels) in <module:Mocks>'
4) Reraising eager raises during the verify step when an expectation is called out of order reraises during verification
# Says bar was called 0 times when it was, see: http://git.io/pjTq
Failure/Error: expect { verify_all }.to fail_with(/received :bar out of order/)
expected RSpec::Mocks::MockExpectationError with message matching /received :bar out of order/ but nothing was raised
# ./spec/rspec/mocks/reraising_eager_raises_spec.rb:105:in `block (4 levels) in <top (required)>'
# ./spec/spec_helper.rb:45:in `with_unfulfilled_double'
# ./spec/rspec/mocks/reraising_eager_raises_spec.rb:100:in `block (3 levels) in <top (required)>'
5) #any_instance invocation order when setting a message expectation raises an error if 'with' follows 'and_raise'
# see Github issue #42
Got 2 failures:
5.1) Failure/Error: expect { expect_any_instance_of(klass).to receive(:foo).and_raise(1).with("1") }.to raise_error(NoMethodError)
expected NoMethodError but nothing was raised
# ./spec/rspec/mocks/any_instance_spec.rb:42:in `block (4 levels) in <module:Mocks>'
5.2) Failure/Error: DEFAULT_FAILURE_NOTIFIER = lambda { |failure, _opts| raise failure }
Exactly one instance should have received the following message(s) but didn't: foo
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:87:in `block in <module:Support>'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:96:in `call'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:96:in `notify_failure'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/error_generator.rb:325:in `notify'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/error_generator.rb:309:in `__raise'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb:7:in `raise_second_instance_received_message_error'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/any_instance/recorder.rb:94:in `verify'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `block in verify_all'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `each_value'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `verify_all'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks.rb:45:in `verify'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/mocking_adapters/rspec.rb:23:in `verify_mocks_for_rspec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:491:in `verify_mocks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:485:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
6) #any_instance invocation order when setting a message expectation raises an error if 'with' follows 'and_return'
# see Github issue #42
Got 2 failures:
6.1) Failure/Error: expect { expect_any_instance_of(klass).to receive(:foo).and_return(1).with("1") }.to raise_error(NoMethodError)
expected NoMethodError but nothing was raised
# ./spec/rspec/mocks/any_instance_spec.rb:37:in `block (4 levels) in <module:Mocks>'
6.2) Failure/Error: DEFAULT_FAILURE_NOTIFIER = lambda { |failure, _opts| raise failure }
Exactly one instance should have received the following message(s) but didn't: foo
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:87:in `block in <module:Support>'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:96:in `call'
# /Users/joerafaniello/Code/rspec-support/lib/rspec/support.rb:96:in `notify_failure'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/error_generator.rb:325:in `notify'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/error_generator.rb:309:in `__raise'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb:7:in `raise_second_instance_received_message_error'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/any_instance/recorder.rb:94:in `verify'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `block in verify_all'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `each_value'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks/space.rb:75:in `verify_all'
# /Users/joerafaniello/Code/rspec-mocks/lib/rspec/mocks.rb:45:in `verify'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/mocking_adapters/rspec.rb:23:in `verify_mocks_for_rspec'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:491:in `verify_mocks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:485:in `run_after_example'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:251:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `block in with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `block in with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:616:in `run_around_example_hooks_for'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/hooks.rb:478:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:434:in `with_around_example_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:477:in `with_around_and_singleton_context_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example.rb:233:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:595:in `block in run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:591:in `run_examples'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:557:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `block in run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/example_group.rb:558:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `map'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/configuration.rb:1680:in `with_suite_hooks'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:114:in `block in run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/reporter.rb:77:in `report'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:113:in `run_specs'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:89:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:73:in `run'
# /Users/joerafaniello/Code/rspec-core/lib/rspec/core/runner.rb:41:in `invoke'
# /Users/joerafaniello/Code/rspec-core/exe/rspec:4:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
7) RSpec::Mocks::Double#and_yield with eval context as block argument and yielded arguments that are optional yields the default argument when the argument is not given
# Not sure how to achieve this yet. See rspec/rspec-mocks#714 and rspec/rspec-support#85.
Got 2 failures:
7.1) Failure/Error: eval("object.a_message { |receiver=default_arg| receiver.bar }")
#<Object:0x007fd4f783bac0> yielded || to block with arity of 1
# ./spec/rspec/mocks/and_yield_spec.rb:111:in `eval'
# (eval):1:in `block (6 levels) in <top (required)>'
# ./spec/rspec/mocks/and_yield_spec.rb:111:in `eval'
# ./spec/rspec/mocks/and_yield_spec.rb:111:in `block (6 levels) in <top (required)>'
7.2) Failure/Error: expect(default_arg).to receive(:bar)
(#<Object:0x007fd4f783bae8>).bar(*(any args))
expected: 1 time with any arguments
received: 0 times with any arguments
# ./spec/rspec/mocks/and_yield_spec.rb:109:in `block (6 levels) in <top (required)>'
Finished in 1.96 seconds (files took 0.46172 seconds to load)
1651 examples, 0 failures, 7 pending
Randomized with seed 29581
Coverage report generated for RSpec to /Users/joerafaniello/Code/rspec-mocks/coverage. 2541 / 2608 LOC (97.43%) covered.
@jrafanie
Copy link
Author

Perhaps related to this? https://bugs.ruby-lang.org/issues/11278

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