Skip to content

Commit

Permalink
remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Oct 21, 2013
1 parent a803e39 commit c95394b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Expand Up @@ -171,7 +171,7 @@ def verify_combined_implementation
end

it 'warns when the inner implementation block is overriden' do
expect(RSpec).to receive(:warning).with /overriding a previous implementation/
expect(RSpec).to receive(:warning).with(/overriding a previous implementation/)
double.stub(:foo).with(:arg) { :with_block }.at_least(:once) { :at_least_block }
end

Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/mocks/matchers/receive_messages_spec.rb
Expand Up @@ -85,7 +85,7 @@ module Mocks

it 'fails with the correct location' do
expect(obj).to receive_messages(:a => 1, :b => 2); line = __LINE__
expect(expectation_error.backtrace[0]).to match /#{__FILE__}:#{line}/
expect(expectation_error.backtrace[0]).to match(/#{__FILE__}:#{line}/)
end

it_behaves_like "complains when given blocks"
Expand Down
2 changes: 0 additions & 2 deletions spec/rspec/mocks/space_spec.rb
Expand Up @@ -16,11 +16,9 @@ module RSpec::Mocks
parent_class = Class.new(grandparent_class)
child_class = Class.new(parent_class)

grandparent = grandparent_class.new
parent = parent_class.new
child = child_class.new

grandparent_proxy = space.proxy_for(grandparent)
parent_proxy = space.proxy_for(parent)
child_proxy = space.proxy_for(child)

This comment has been minimized.

Copy link
@myronmarston

myronmarston Oct 21, 2013

Member

Why did you remove these lines? It changes the semantics of the example. If it complained that grandparent_proxy wasn't being used, then you can change the line to space.proxy_for(grandparent) (without assigning a local) but we definitely want the proxy created for the grandparent, to demonstrate that space.proxies_of finds instances of the given class and subclasses but not of superclasses.

This comment has been minimized.

Copy link
@JonRowe

JonRowe Oct 21, 2013

Author Member

Misread the spec, restored.


Expand Down

0 comments on commit c95394b

Please sign in to comment.