2005-09-23 19:30:09 -04:00
|
|
|
# $Id$
|
2003-09-17 05:52:50 -04:00
|
|
|
|
|
|
|
require 'fileutils'
|
2003-11-25 04:13:58 -05:00
|
|
|
require 'test/unit'
|
2011-02-04 13:37:52 -05:00
|
|
|
require_relative 'clobber'
|
2003-09-17 05:52:50 -04:00
|
|
|
|
2005-09-23 19:30:09 -04:00
|
|
|
class TestFileUtilsNoWrite < Test::Unit::TestCase
|
2003-09-17 05:52:50 -04:00
|
|
|
|
|
|
|
include FileUtils::NoWrite
|
2011-02-04 13:37:52 -05:00
|
|
|
include TestFileUtils::Clobber
|
2003-09-17 05:52:50 -04:00
|
|
|
|
2005-09-23 19:30:09 -04:00
|
|
|
def test_visibility
|
|
|
|
FileUtils::METHODS.each do |m|
|
|
|
|
assert_equal true, FileUtils::NoWrite.respond_to?(m, true),
|
|
|
|
"FileUtils::NoWrite.#{m} is not defined"
|
|
|
|
assert_equal true, FileUtils::NoWrite.respond_to?(m, false),
|
|
|
|
"FileUtils::NoWrite.#{m} is not public"
|
|
|
|
end
|
|
|
|
FileUtils::METHODS.each do |m|
|
|
|
|
assert_equal true, respond_to?(m, true),
|
|
|
|
"FileUtils::NoWrite\##{m} is not defined"
|
|
|
|
assert_equal true, FileUtils::NoWrite.private_method_defined?(m),
|
|
|
|
"FileUtils::NoWrite\##{m} is not private"
|
|
|
|
end
|
|
|
|
end
|
2003-09-17 05:52:50 -04:00
|
|
|
end
|