Skip to content
Browse files

Fix 'assigned but unused variable' warnings in spec.

  • Loading branch information...
1 parent 63fb2bc commit c3c8a9753eb5ce8a29e54a7d019637c9455f165d @mvz mvz committed Oct 30, 2011
View
2 spec/rspec/mocks/any_instance/message_chains_spec.rb
@@ -19,7 +19,7 @@
it "can remove all stub chains" do
chains.add(:method_name, stub_chain)
chains.add(:method_name, expectation_chain)
- chains.add(:method_name, another_stub_chain = RSpec::Mocks::AnyInstance::StubChain.new)
+ chains.add(:method_name, RSpec::Mocks::AnyInstance::StubChain.new)
chains.remove_stub_chains_for!(:method_name)
chains[:method_name].should eq([expectation_chain])
View
2 spec/rspec/mocks/mock_space_spec.rb
@@ -38,7 +38,7 @@ def reset?
@space.reset_all
end
it "clears internal mocks on reset_all" do
- @space.add(m = double("mock"))
+ @space.add(double("mock"))
@space.reset_all
@space.instance_eval { mocks.empty? }.should be_true
end
View
3 spec/rspec/mocks/multiple_return_value_spec.rb
@@ -61,7 +61,6 @@ module Mocks
end
it "complains when there are too few calls" do
- third = Object.new
@mock.message.should eq @return_values[0]
@mock.message.should eq @return_values[1]
expect { @mock.rspec_verify }.to raise_error(
@@ -71,7 +70,6 @@ module Mocks
end
it "complains when there are too many calls" do
- third = Object.new
@mock.message.should eq @return_values[0]
@mock.message.should eq @return_values[1]
@mock.message.should eq @return_values[2]
@@ -83,7 +81,6 @@ module Mocks
end
it "complains when there are too many calls and method is stubbed too" do
- third = Object.new
@mock.stub(:message).and_return :stub_result
@mock.message.should eq @return_values[0]
@mock.message.should eq @return_values[1]
View
2 spec/rspec/mocks/nil_expectation_warning_spec.rb
@@ -5,7 +5,7 @@ def remove_last_describe_from_world
end
def empty_example_group
- group = RSpec::Core::ExampleGroup.describe(Object, 'Empty Behaviour Group') { }
+ RSpec::Core::ExampleGroup.describe(Object, 'Empty Behaviour Group') { }
remove_last_describe_from_world
end
View
2 spec/rspec/mocks/serialization_spec.rb
@@ -67,7 +67,7 @@ def set_stub
compiled_with_psych = begin
require 'psych'
true
- rescue LoadError => e
+ rescue LoadError
false
end

0 comments on commit c3c8a97

Please sign in to comment.
Something went wrong with that request. Please try again.