Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add forgotten testcase

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit ccadfc36953a8547dc9386eb77eb4fc1147817f3 1 parent e714b25
@seckar seckar authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 activesupport/test/core_ext/pathname_test.rb
View
12 activesupport/test/core_ext/pathname_test.rb
@@ -0,0 +1,12 @@
+require 'test/unit'
+require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/pathname'
+
+class TestPathname < Test::Unit::TestCase
+
+ def test_clean_within
+ assert_equal "Hi", Pathname.clean_within("Hi")
+ assert_equal "Hi", Pathname.clean_within("Hi/a/b/../..")
+ assert_equal "Hello\nWorld", Pathname.clean_within("Hello/a/b/../..\na/b/../../World/c/..")
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.