Skip to content
This repository
Browse code

Mocha 0.10.5 compatibility.

  • Loading branch information...
commit 286d8f9c1c37179ed5c5b5417dbf6385e1dc9608 1 parent 5a39f66
Tristan Dunn authored March 08, 2012 gabebw committed March 09, 2012
4  Gemfile.lock
@@ -2,13 +2,13 @@ PATH
2 2
   remote: .
3 3
   specs:
4 4
     bourne (1.1.1)
5  
-      mocha (= 0.10.4)
  5
+      mocha (= 0.10.5)
6 6
 
7 7
 GEM
8 8
   remote: http://rubygems.org/
9 9
   specs:
10 10
     metaclass (0.0.1)
11  
-    mocha (0.10.4)
  11
+    mocha (0.10.5)
12 12
       metaclass (~> 0.0.1)
13 13
     rake (0.9.2.2)
14 14
 
2  bourne.gemspec
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20 20
   s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21 21
   s.require_paths = ["lib"]
22 22
 
23  
-  s.add_dependency('mocha', '= 0.10.4')
  23
+  s.add_dependency('mocha', '= 0.10.5')
24 24
 
25 25
   s.add_development_dependency('rake')
26 26
 end
8  test/unit/mock_test.rb
@@ -20,7 +20,7 @@ def test_should_build_and_store_expectations
20 20
    mock = build_mock
21 21
    expectation = mock.expects(:method1)
22 22
    assert_not_nil expectation
23  
-   assert_equal [expectation], mock.expectations.to_a
  23
+   assert_equal [expectation], mock.__expectations__.to_a
24 24
   end
25 25
 
26 26
   def test_should_not_stub_everything_by_default
@@ -67,7 +67,7 @@ def test_should_create_and_add_expectations
67 67
     mock = build_mock
68 68
     expectation1 = mock.expects(:method1)
69 69
     expectation2 = mock.expects(:method2)
70  
-    assert_equal [expectation1, expectation2].to_set, mock.expectations.to_set
  70
+    assert_equal [expectation1, expectation2].to_set, mock.__expectations__.to_set
71 71
   end
72 72
 
73 73
   def test_should_pass_backtrace_into_expectation
@@ -88,7 +88,7 @@ def test_should_create_and_add_stubs
88 88
     mock = build_mock
89 89
     stub1 = mock.stubs(:method1)
90 90
     stub2 = mock.stubs(:method2)
91  
-    assert_equal [stub1, stub2].to_set, mock.expectations.to_set
  91
+    assert_equal [stub1, stub2].to_set, mock.__expectations__.to_set
92 92
   end
93 93
 
94 94
   def test_should_invoke_expectation_and_return_result
@@ -325,7 +325,7 @@ def test_should_record_invocations
325 325
     args   = [1, 2]
326 326
     mock = Mock.new(method)
327 327
     expectation = FakeExpectation.new
328  
-    mock.expectations.add expectation
  328
+    mock.__expectations__.add expectation
329 329
     mock.send(method, *args)
330 330
     assert_equal args, expectation.args
331 331
   end

0 notes on commit 286d8f9

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