Skip to content
This repository
  • 10 commits
  • 12 files changed
  • 0 comments
  • 3 contributors
7  Changelog.md
Source Rendered
... ...
@@ -1,3 +1,10 @@
  1
+### 2.8.0.rc1 / 2011-11-06
  2
+
  3
+[full changelog](http://github.com/rspec/rspec-mocks/compare/v2.7.0...v2.8.0.rc1)
  4
+
  5
+* Enhancements
  6
+    * Eliminate Ruby warnings (Matijs van Zuijlen)
  7
+
1 8
 ### 2.7.0 / 2011-10-16
2 9
 
3 10
 [full changelog](http://github.com/rspec/rspec-mocks/compare/v2.6.0...v2.7.0)
8  Gemfile
@@ -31,9 +31,11 @@ group :development do
31 31
   end
32 32
 
33 33
   platforms :mri_19 do
34  
-    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
35  
-    gem 'ruby-debug19'
36  
-    gem 'ruby-debug-base19', RUBY_VERSION == '1.9.1' ? '0.11.23' : '~> 0.11.24'
  34
+    if RUBY_VERSION == '1.9.2'
  35
+      gem 'linecache19', '0.5.12'
  36
+      gem 'ruby-debug19', '0.11.6'
  37
+      gem 'ruby-debug-base19', '0.11.25'
  38
+    end
37 39
   end
38 40
 
39 41
   platforms :mri_18, :mri_19 do
1  Rakefile
@@ -9,6 +9,7 @@ require 'cucumber/rake/task'
9 9
 
10 10
 desc "Run all examples"
11 11
 RSpec::Core::RakeTask.new(:spec) do |t|
  12
+  t.ruby_opts = %w[-w]
12 13
   t.rspec_opts = %w[--color]
13 14
 end
14 15
 
1  lib/rspec/mocks/any_instance/recorder.rb
@@ -156,7 +156,6 @@ def mark_invoked!(method_name)
156 156
           @klass.class_eval(<<-EOM, __FILE__, __LINE__)
157 157
             def #{method_name}(*args, &blk)
158 158
               method_name = :#{method_name}
159  
-              current_instance = self
160 159
               invoked_instance = self.class.__recorder.instance_that_received(method_name)
161 160
               raise RSpec::Mocks::MockExpectationError, "The message '#{method_name}' was received by \#{self.inspect} but has already been received by \#{invoked_instance}"
162 161
             end
4  lib/rspec/mocks/argument_matchers.rb
@@ -60,7 +60,7 @@ def ==(actual)
60 60
             return false unless actual.has_key?(key) && value == actual[key]
61 61
           end
62 62
           true
63  
-        rescue NoMethodError => ex
  63
+        rescue NoMethodError
64 64
           return false
65 65
         end
66 66
 
@@ -79,7 +79,7 @@ def ==(actual)
79 79
             return false if actual.has_key?(key) && value == actual[key]
80 80
           end
81 81
           true
82  
-        rescue NoMethodError => ex
  82
+        rescue NoMethodError
83 83
           return false
84 84
         end
85 85
 
2  lib/rspec/mocks/version.rb
... ...
@@ -1,7 +1,7 @@
1 1
 module RSpec
2 2
   module Mocks
3 3
     module Version
4  
-      STRING = '2.7.0'
  4
+      STRING = '2.8.0.rc1'
5 5
     end
6 6
   end
7 7
 end
2  spec/rspec/mocks/any_instance/message_chains_spec.rb
@@ -19,7 +19,7 @@
19 19
   it "can remove all stub chains" do
20 20
     chains.add(:method_name, stub_chain)
21 21
     chains.add(:method_name, expectation_chain)
22  
-    chains.add(:method_name, another_stub_chain = RSpec::Mocks::AnyInstance::StubChain.new)
  22
+    chains.add(:method_name, RSpec::Mocks::AnyInstance::StubChain.new)
23 23
 
24 24
     chains.remove_stub_chains_for!(:method_name)
25 25
     chains[:method_name].should eq([expectation_chain])
2  spec/rspec/mocks/mock_space_spec.rb
@@ -38,7 +38,7 @@ def reset?
38 38
         @space.reset_all
39 39
       end
40 40
       it "clears internal mocks on reset_all" do
41  
-        @space.add(m = double("mock"))
  41
+        @space.add(double("mock"))
42 42
         @space.reset_all
43 43
         @space.instance_eval { mocks.empty? }.should be_true
44 44
       end
3  spec/rspec/mocks/multiple_return_value_spec.rb
@@ -61,7 +61,6 @@ module Mocks
61 61
       end
62 62
 
63 63
       it "complains when there are too few calls" do
64  
-        third = Object.new
65 64
         @mock.message.should eq @return_values[0]
66 65
         @mock.message.should eq @return_values[1]
67 66
         expect { @mock.rspec_verify }.to raise_error(
@@ -71,7 +70,6 @@ module Mocks
71 70
       end
72 71
 
73 72
       it "complains when there are too many calls" do
74  
-        third = Object.new
75 73
         @mock.message.should eq @return_values[0]
76 74
         @mock.message.should eq @return_values[1]
77 75
         @mock.message.should eq @return_values[2]
@@ -83,7 +81,6 @@ module Mocks
83 81
       end
84 82
 
85 83
       it "complains when there are too many calls and method is stubbed too" do
86  
-        third = Object.new
87 84
         @mock.stub(:message).and_return :stub_result
88 85
         @mock.message.should eq @return_values[0]
89 86
         @mock.message.should eq @return_values[1]
2  spec/rspec/mocks/nil_expectation_warning_spec.rb
@@ -5,7 +5,7 @@ def remove_last_describe_from_world
5 5
 end
6 6
 
7 7
 def empty_example_group
8  
-  group = RSpec::Core::ExampleGroup.describe(Object, 'Empty Behaviour Group') { }
  8
+  RSpec::Core::ExampleGroup.describe(Object, 'Empty Behaviour Group') { }
9 9
   remove_last_describe_from_world
10 10
 end
11 11
 
2  spec/rspec/mocks/serialization_spec.rb
@@ -67,7 +67,7 @@ def set_stub
67 67
         compiled_with_psych = begin
68 68
           require 'psych'
69 69
           true
70  
-        rescue LoadError => e
  70
+        rescue LoadError
71 71
           false
72 72
         end
73 73
 
1  spec/spec_helper.rb
@@ -36,6 +36,7 @@ def treats_method_missing_as_private(options = {:noop => true, :subject => nil})
36 36
 RSpec.configure do |config|
37 37
   config.mock_with :rspec
38 38
   config.color_enabled = true
  39
+  config.order = :random
39 40
   config.extend(Macros)
40 41
   config.include(RSpec::Mocks::Methods)
41 42
 

No commit comments for this range

Something went wrong with that request. Please try again.