Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rspec/rspec-mocks
...
head fork: rspec/rspec-mocks
  • 10 commits
  • 12 files changed
  • 0 commit comments
  • 3 contributors
View
7 Changelog.md
@@ -1,3 +1,10 @@
+### 2.8.0.rc1 / 2011-11-06
+
+[full changelog](http://github.com/rspec/rspec-mocks/compare/v2.7.0...v2.8.0.rc1)
+
+* Enhancements
+ * Eliminate Ruby warnings (Matijs van Zuijlen)
+
### 2.7.0 / 2011-10-16
[full changelog](http://github.com/rspec/rspec-mocks/compare/v2.6.0...v2.7.0)
View
8 Gemfile
@@ -31,9 +31,11 @@ group :development do
end
platforms :mri_19 do
- gem 'linecache19', '0.5.11' # 0.5.12 cannot install on 1.9.1, and 0.5.11 appears to work with both 1.9.1 & 1.9.2
- gem 'ruby-debug19'
- gem 'ruby-debug-base19', RUBY_VERSION == '1.9.1' ? '0.11.23' : '~> 0.11.24'
+ if RUBY_VERSION == '1.9.2'
+ gem 'linecache19', '0.5.12'
+ gem 'ruby-debug19', '0.11.6'
+ gem 'ruby-debug-base19', '0.11.25'
+ end
end
platforms :mri_18, :mri_19 do
View
1  Rakefile
@@ -9,6 +9,7 @@ require 'cucumber/rake/task'
desc "Run all examples"
RSpec::Core::RakeTask.new(:spec) do |t|
+ t.ruby_opts = %w[-w]
t.rspec_opts = %w[--color]
end
View
1  lib/rspec/mocks/any_instance/recorder.rb
@@ -156,7 +156,6 @@ def mark_invoked!(method_name)
@klass.class_eval(<<-EOM, __FILE__, __LINE__)
def #{method_name}(*args, &blk)
method_name = :#{method_name}
- current_instance = self
invoked_instance = self.class.__recorder.instance_that_received(method_name)
raise RSpec::Mocks::MockExpectationError, "The message '#{method_name}' was received by \#{self.inspect} but has already been received by \#{invoked_instance}"
end
View
4 lib/rspec/mocks/argument_matchers.rb
@@ -60,7 +60,7 @@ def ==(actual)
return false unless actual.has_key?(key) && value == actual[key]
end
true
- rescue NoMethodError => ex
+ rescue NoMethodError
return false
end
@@ -79,7 +79,7 @@ def ==(actual)
return false if actual.has_key?(key) && value == actual[key]
end
true
- rescue NoMethodError => ex
+ rescue NoMethodError
return false
end
View
2  lib/rspec/mocks/version.rb
@@ -1,7 +1,7 @@
module RSpec
module Mocks
module Version
- STRING = '2.7.0'
+ STRING = '2.8.0.rc1'
end
end
end
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
View
1  spec/spec_helper.rb
@@ -36,6 +36,7 @@ def treats_method_missing_as_private(options = {:noop => true, :subject => nil})
RSpec.configure do |config|
config.mock_with :rspec
config.color_enabled = true
+ config.order = :random
config.extend(Macros)
config.include(RSpec::Mocks::Methods)

No commit comments for this range

Something went wrong with that request. Please try again.