lib/mocha/any_instance_method.rb in jferris-mocha-0.9.5.0.1241126838 vs lib/mocha/any_instance_method.rb in jferris-mocha-0.9.7.0.1247796736
- old
+ new
@@ -23,10 +23,14 @@
end
end
end
def define_new_method
- stubbee.class_eval("def #{method}(*args, &block); self.class.any_instance.mocha.method_missing(:#{method}, *args, &block); end", __FILE__, __LINE__)
+ stubbee.class_eval(%{
+ def #{method}(*args, &block)
+ self.class.any_instance.mocha.method_missing(:#{method}, *args, &block)
+ end
+ }, __FILE__, __LINE__)
end
def remove_new_method
stubbee.send(:remove_method, method)
end
\ No newline at end of file