From c95394b9d318bffb4c5c9270aad66d1098602659 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 21 Oct 2013 22:18:53 +1100 Subject: [PATCH] remove warnings --- spec/rspec/mocks/combining_implementation_instructions_spec.rb | 2 +- spec/rspec/mocks/matchers/receive_messages_spec.rb | 2 +- spec/rspec/mocks/space_spec.rb | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/rspec/mocks/combining_implementation_instructions_spec.rb b/spec/rspec/mocks/combining_implementation_instructions_spec.rb index aa06939c1..8a9de33a5 100644 --- a/spec/rspec/mocks/combining_implementation_instructions_spec.rb +++ b/spec/rspec/mocks/combining_implementation_instructions_spec.rb @@ -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 diff --git a/spec/rspec/mocks/matchers/receive_messages_spec.rb b/spec/rspec/mocks/matchers/receive_messages_spec.rb index 63e1e23ab..b28ad694f 100644 --- a/spec/rspec/mocks/matchers/receive_messages_spec.rb +++ b/spec/rspec/mocks/matchers/receive_messages_spec.rb @@ -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" diff --git a/spec/rspec/mocks/space_spec.rb b/spec/rspec/mocks/space_spec.rb index 774416217..69f8d1b9f 100644 --- a/spec/rspec/mocks/space_spec.rb +++ b/spec/rspec/mocks/space_spec.rb @@ -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)