test/unit/class_method_test.rb in mocha-1.1.0 vs test/unit/class_method_test.rb in mocha-1.2.0
- old
+ new
@@ -6,17 +6,19 @@
class ClassMethodTest < Mocha::TestCase
include Mocha
+unless RUBY_V2_PLUS
def test_should_hide_original_method
klass = Class.new { def self.method_x; end }
method = ClassMethod.new(klass, :method_x)
method.hide_original_method
assert_equal false, klass.respond_to?(:method_x)
end
+end
def test_should_not_raise_error_hiding_method_that_isnt_defined
klass = Class.new
method = ClassMethod.new(klass, :method_x)