Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mocha 0.10.5 compatibility.

  • Loading branch information...
commit 286d8f9c1c37179ed5c5b5417dbf6385e1dc9608 1 parent 5a39f66
@tristandunn tristandunn authored gabebw committed
Showing with 7 additions and 7 deletions.
  1. +2 −2 Gemfile.lock
  2. +1 −1  bourne.gemspec
  3. +4 −4 test/unit/mock_test.rb
View
4 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)
View
2  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
View
8 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
Please sign in to comment.
Something went wrong with that request. Please try again.