Skip to content

Commit

Permalink
removing the Spanish Inquisition special case :(
Browse files Browse the repository at this point in the history
  • Loading branch information
nitishr committed Feb 18, 2020
1 parent cc91b87 commit ea411b7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions lib/mocha/object_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions test/unit/object_methods_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ea411b7

Please sign in to comment.