test/integration/shared_tests.rb in mocha-1.9.0 vs test/integration/shared_tests.rb in mocha-1.10.0.alpha

- old
+ new

@@ -1,8 +1,9 @@ require 'test_runner' require 'execution_point' +# rubocop:disable Metrics/ModuleLength module SharedTests include TestRunner def test_assertion_satisfied test_result = run_as_test do @@ -61,11 +62,11 @@ failure = test_result.failures.first assert_equal execution_point, ExecutionPoint.new(failure.location) assert_equal [ 'not all expectations were satisfied', 'unsatisfied expectations:', - '- expected exactly once, not yet invoked: #<Mock:expecting invocation>.expected(any_parameters)' + '- expected exactly once, invoked never: #<Mock:expecting invocation>.expected(any_parameters)' ], test_result.failure_message_lines end def test_mock_object_unexpected_invocation_in_setup execution_point = nil @@ -99,11 +100,11 @@ failure = test_result.failures.first assert_equal execution_point, ExecutionPoint.new(failure.location) assert_equal [ 'not all expectations were satisfied', 'unsatisfied expectations:', - '- expected exactly once, not yet invoked: #<Mock:expecting invocation>.expected(any_parameters)' + '- expected exactly once, invoked never: #<Mock:expecting invocation>.expected(any_parameters)' ], test_result.failure_message_lines end def test_mock_object_unexpected_invocation_in_teardown execution_point = nil @@ -149,11 +150,11 @@ failure = test_result.failures.first assert_equal execution_point, ExecutionPoint.new(failure.location) assert_equal [ 'not all expectations were satisfied', 'unsatisfied expectations:', - "- expected exactly once, not yet invoked: #{object.mocha_inspect}.expected(any_parameters)" + "- expected exactly once, invoked never: #{object.mocha_inspect}.expected(any_parameters)" ], test_result.failure_message_lines end def test_real_object_expectation_does_not_leak_into_subsequent_test execution_point = nil @@ -172,5 +173,6 @@ assert_equal execution_point, ExecutionPoint.new(exception.backtrace) assert_match(/undefined method `foo'/, exception.message) end # rubocop:enable Style/Semicolon end +# rubocop:enable Metrics/ModuleLength