2005-09-23 19:30:09 -04:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
require 'test/unit'
|
|
|
|
require 'fileutils'
|
|
|
|
|
|
|
|
class TestFileUtilsVerbose < Test::Unit::TestCase
|
|
|
|
|
|
|
|
include FileUtils::Verbose
|
|
|
|
|
2012-02-17 12:59:47 -05:00
|
|
|
FileUtils::METHODS.each do |m|
|
|
|
|
define_method "test_singleton_visibility_#{m}" do
|
2005-09-23 19:30:09 -04:00
|
|
|
assert_equal true, FileUtils::Verbose.respond_to?(m, true),
|
|
|
|
"FileUtils::Verbose.#{m} is not defined"
|
|
|
|
assert_equal true, FileUtils::Verbose.respond_to?(m, false),
|
|
|
|
"FileUtils::Verbose.#{m} is not public"
|
|
|
|
end
|
2012-02-17 12:59:47 -05:00
|
|
|
|
|
|
|
define_method "test_visibility_#{m}" do
|
2005-09-23 19:30:09 -04:00
|
|
|
assert_equal true, respond_to?(m, true),
|
2012-02-17 12:59:47 -05:00
|
|
|
"FileUtils::Verbose\##{m} is not defined"
|
2005-09-23 19:30:09 -04:00
|
|
|
assert_equal true, FileUtils::Verbose.private_method_defined?(m),
|
2012-02-17 12:59:47 -05:00
|
|
|
"FileUtils::Verbose\##{m} is not private"
|
2005-09-23 19:30:09 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|