diff --git a/lib/mocha/object_methods.rb b/lib/mocha/object_methods.rb index 4e4e59673..f91894f5f 100644 --- a/lib/mocha/object_methods.rb +++ b/lib/mocha/object_methods.rb @@ -69,9 +69,6 @@ def stubba_class # # @see Mock#expects def expects(expected_methods_vs_return_values) - if expected_methods_vs_return_values.to_s =~ /the[^a-z]*spanish[^a-z]*inquisition/i - raise ExpectationErrorFactory.build('NOBODY EXPECTS THE SPANISH INQUISITION!') - end if frozen? raise StubbingError.new("can't stub method on frozen object: #{mocha_inspect}", caller) end diff --git a/test/unit/object_methods_test.rb b/test/unit/object_methods_test.rb index 13b603a07..2abee0c8d 100644 --- a/test/unit/object_methods_test.rb +++ b/test/unit/object_methods_test.rb @@ -51,10 +51,6 @@ def test_should_stub_self_for_object assert_equal @object, @object.stubba_object end - def test_nobody_expects_the_spanish_inquisition - assert_raises(Mocha::ExpectationErrorFactory.exception_class) { @object.expects(:the_spanish_inquisition) } - end - def test_should_alias_object_method klass = Class.new { def self.method_x; end } klass.extend(Mocha::ObjectMethods)