Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but 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
7 Changelog.md
View
@@ -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)
8 Gemfile
View
@@ -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
1  Rakefile
View
@@ -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
1  lib/rspec/mocks/any_instance/recorder.rb
View
@@ -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
4 lib/rspec/mocks/argument_matchers.rb
View
@@ -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
2  lib/rspec/mocks/version.rb
View
@@ -1,7 +1,7 @@
module RSpec
module Mocks
module Version
- STRING = '2.7.0'
+ STRING = '2.8.0.rc1'
end
end
end
2  spec/rspec/mocks/any_instance/message_chains_spec.rb
View
@@ -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])
2  spec/rspec/mocks/mock_space_spec.rb
View
@@ -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
3  spec/rspec/mocks/multiple_return_value_spec.rb
View
@@ -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]
2  spec/rspec/mocks/nil_expectation_warning_spec.rb
View
@@ -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
2  spec/rspec/mocks/serialization_spec.rb
View
@@ -67,7 +67,7 @@ def set_stub
compiled_with_psych = begin
require 'psych'
true
- rescue LoadError => e
+ rescue LoadError
false
end
1  spec/spec_helper.rb
View
@@ -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.