From e5a64662a16cb8fcd7634bcfe29e94140128fcda Mon Sep 17 00:00:00 2001 From: Matthias Viehweger Date: Tue, 6 Apr 2010 10:38:21 +0200 Subject: [PATCH] test added --- plugins/adva_safemode/test/test_jail.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/adva_safemode/test/test_jail.rb b/plugins/adva_safemode/test/test_jail.rb index f1926580d..d6cd4bb4c 100644 --- a/plugins/adva_safemode/test/test_jail.rb +++ b/plugins/adva_safemode/test/test_jail.rb @@ -25,6 +25,18 @@ def test_jail_instances_should_have_limited_methods end end + # def test_jail_instances_keep_try + # object = "string" + # object.instance_eval do + # def try(*args) + # "some try method which is so popular/useful nowadays" + # end + # end + # + # assert object.methods.include?("try"), "should have a try method without the jail" + # assert object.to_jail.methods.include?("try"), "should have kept the try method in the jail available" + # end + def test_jail_classes_should_have_limited_methods expected = ["new", "methods", "name", "inherited", "method_added", "inspect", "allow", "allowed?", "allowed_methods", "init_allowed_methods",