test/unit/mockery_test.rb in mocha-0.13.1 vs test/unit/mockery_test.rb in mocha-0.13.2
- old
+ new
@@ -1,8 +1,9 @@
require File.expand_path('../../test_helper', __FILE__)
require 'mocha/mockery'
require 'mocha/state_machine'
+require 'mocha/expectation_error_factory'
class MockeryTest < Test::Unit::TestCase
include Mocha
@@ -29,17 +30,17 @@
mockery = Mockery.new
mock_1 = mockery.named_mock('mock-1') { expects(:method_1) }
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
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
mockery = Mockery.new
assert_not_nil mockery.stubba