Skip to content
Browse files

Make assertions against correct exception class for test framework

Mocha does not raise ExpectationError when run from MiniTest. Change our
assertions to go against whatever Mocha is using for failed expectations

Remove ruby 2.0.0 from allowed failures, add rbx-19
  • Loading branch information...
1 parent dd9eef4 commit d1faa09a07694fcc87687d68cce52426523cb793 @sgrif sgrif committed May 14, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 .travis.yml
  2. +2 −2 test/unit/mockery_test.rb
View
2 .travis.yml
@@ -8,4 +8,4 @@ rvm:
matrix:
allow_failures:
- - rvm: 2.0.0
+ - rvm: rbx-19mode
View
4 test/unit/mockery_test.rb
@@ -32,14 +32,14 @@ def test_should_raise_expectation_error_because_not_all_expectations_are_satisfi
mock_2 = mockery.named_mock('mock-2') { expects(:method_2) }
1.times { mock_1.method_1 }
0.times { mock_2.method_2 }
- assert_raises(ExpectationError) { mockery.verify }
+ assert_raises(ExpectationErrorFactory.exception_class) { mockery.verify }
end
def test_should_reset_list_of_mocks_on_teardown
mockery = Mockery.new
mock = mockery.unnamed_mock { expects(:my_method) }
mockery.teardown
- assert_nothing_raised(ExpectationError) { mockery.verify }
+ assert_nothing_raised(ExpectationErrorFactory.exception_class) { mockery.verify }
end
def test_should_build_instance_of_stubba_on_instantiation

0 comments on commit d1faa09

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