summaryrefslogtreecommitdiff
path: root/test/pathname
diff options
context:
space:
mode:
Diffstat (limited to 'test/pathname')
-rw-r--r--test/pathname/test_pathname.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 94ddbcd9cf..20351fa0f8 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -458,4 +458,10 @@ class TestPathname < Test::Unit::TestCase
assert_equal(1, count)
assert_equal(2, result)
end
+
+ def test_each_filename
+ result = []
+ Pathname.new("/usr/bin/ruby").each_filename {|f| result << f }
+ assert_equal(%w[usr bin ruby], result)
+ end
end