From 286d8f9c1c37179ed5c5b5417dbf6385e1dc9608 Mon Sep 17 00:00:00 2001 From: Tristan Dunn Date: Thu, 8 Mar 2012 12:26:37 -0600 Subject: [PATCH] Mocha 0.10.5 compatibility. --- Gemfile.lock | 4 ++-- bourne.gemspec | 2 +- test/unit/mock_test.rb | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index eef9e2a..7e6e2d3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,13 +2,13 @@ PATH remote: . specs: bourne (1.1.1) - mocha (= 0.10.4) + mocha (= 0.10.5) GEM remote: http://rubygems.org/ specs: metaclass (0.0.1) - mocha (0.10.4) + mocha (0.10.5) metaclass (~> 0.0.1) rake (0.9.2.2) diff --git a/bourne.gemspec b/bourne.gemspec index 90408fa..c23c308 100644 --- a/bourne.gemspec +++ b/bourne.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_dependency('mocha', '= 0.10.4') + s.add_dependency('mocha', '= 0.10.5') s.add_development_dependency('rake') end diff --git a/test/unit/mock_test.rb b/test/unit/mock_test.rb index ff604fe..2b2c337 100644 --- a/test/unit/mock_test.rb +++ b/test/unit/mock_test.rb @@ -20,7 +20,7 @@ def test_should_build_and_store_expectations mock = build_mock expectation = mock.expects(:method1) assert_not_nil expectation - assert_equal [expectation], mock.expectations.to_a + assert_equal [expectation], mock.__expectations__.to_a end def test_should_not_stub_everything_by_default @@ -67,7 +67,7 @@ def test_should_create_and_add_expectations mock = build_mock expectation1 = mock.expects(:method1) expectation2 = mock.expects(:method2) - assert_equal [expectation1, expectation2].to_set, mock.expectations.to_set + assert_equal [expectation1, expectation2].to_set, mock.__expectations__.to_set end def test_should_pass_backtrace_into_expectation @@ -88,7 +88,7 @@ def test_should_create_and_add_stubs mock = build_mock stub1 = mock.stubs(:method1) stub2 = mock.stubs(:method2) - assert_equal [stub1, stub2].to_set, mock.expectations.to_set + assert_equal [stub1, stub2].to_set, mock.__expectations__.to_set end def test_should_invoke_expectation_and_return_result @@ -325,7 +325,7 @@ def test_should_record_invocations args = [1, 2] mock = Mock.new(method) expectation = FakeExpectation.new - mock.expectations.add expectation + mock.__expectations__.add expectation mock.send(method, *args) assert_equal args, expectation.args end