diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-06 09:31:37 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-06 09:31:37 +0000 |
commit | f6d2b4858891376dec83e43dccfa028d4b32b184 (patch) | |
tree | 053f00bd120e730616a371793eb579edddba29e4 /test/rake/test_rake_pathname_extensions.rb | |
parent | 6057695c87cf8281f3ff9aa37cfdf1c317e1f9c1 (diff) |
* lib/rake.rb, lib/rake/*, test/rake/*: Update latest rake master(e47d023)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_pathname_extensions.rb')
-rw-r--r-- | test/rake/test_rake_pathname_extensions.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rake/test_rake_pathname_extensions.rb b/test/rake/test_rake_pathname_extensions.rb new file mode 100644 index 0000000000..7da702d0c7 --- /dev/null +++ b/test/rake/test_rake_pathname_extensions.rb @@ -0,0 +1,15 @@ +require File.expand_path('../helper', __FILE__) +require 'rake/ext/pathname' + +class TestRakePathnameExtensions < Rake::TestCase + def test_ext_works_on_pathnames + pathname = Pathname.new("abc.foo") + assert_equal Pathname.new("abc.bar"), pathname.ext("bar") + end + + def test_path_map_works_on_pathnames + pathname = Pathname.new("this/is/a/dir/abc.rb") + assert_equal Pathname.new("abc.rb"), pathname.pathmap("%f") + assert_equal Pathname.new("this/is/a/dir"), pathname.pathmap("%d") + end +end |