test/test_helper.rb in surrounded-0.3.1 vs test/test_helper.rb in surrounded-0.4.0
- old
+ new
@@ -23,6 +23,19 @@
setup(:user, :other_user)
trigger :access_other_object do
user.other_user.name
end
+end
+
+# This is a different implementation of module_method_rebinding?
+# created in order to check that the behavior of the code is correct.
+#
+# This method is used in tests and module_method_rebinding? is used
+# in the library code.
+def test_rebinding_methods?
+ unbound = Enumerable.instance_method(:count)
+ unbound.bind(Object.new)
+ true
+rescue TypeError
+ false
end
\ No newline at end of file