summaryrefslogtreecommitdiff
path: root/test/fileutils/test_dryrun.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-17 17:59:47 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-17 17:59:47 +0000
commitace46301d8299c1e010eb7bb858bffc471be6763 (patch)
treedf3f59d53f7b087cfa6dba23615f836540810665 /test/fileutils/test_dryrun.rb
parent92e7c2d3eab31487164a41984a246f5809936b1a (diff)
* lib/fileutils.rb: refactored FileUtil methods to use the
`define_command` API. Patch from 7rans <transfire@gmail.com> * test/fileutils/test_dryrun.rb: corresponding test refactoring * test/fileutils/test_nowrite.rb: ditto * test/fileutils/test_verbose.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/fileutils/test_dryrun.rb')
-rw-r--r--test/fileutils/test_dryrun.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/fileutils/test_dryrun.rb b/test/fileutils/test_dryrun.rb
index 85badbd..f467277 100644
--- a/test/fileutils/test_dryrun.rb
+++ b/test/fileutils/test_dryrun.rb
@@ -9,14 +9,15 @@ class TestFileUtilsDryRun < Test::Unit::TestCase
include FileUtils::DryRun
include TestFileUtils::Clobber
- def test_visibility
- FileUtils::METHODS.each do |m|
+ FileUtils::METHODS.each do |m|
+ define_method "test_singleton_visibility_#{m}" do
assert_equal true, FileUtils::DryRun.respond_to?(m, true),
"FileUtils::DryRun.#{m} not defined"
assert_equal true, FileUtils::DryRun.respond_to?(m, false),
"FileUtils::DryRun.#{m} not public"
end
- FileUtils::METHODS.each do |m|
+
+ define_method "test_instance_visibility_#{m}" do
assert_equal true, respond_to?(m, true),
"FileUtils::DryRun\##{m} is not defined"
assert_equal true, FileUtils::DryRun.private_method_defined?(m),