From ccadfc36953a8547dc9386eb77eb4fc1147817f3 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Tue, 4 Apr 2006 19:40:34 +0000 Subject: Add forgotten testcase git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/pathname_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 activesupport/test/core_ext/pathname_test.rb diff --git a/activesupport/test/core_ext/pathname_test.rb b/activesupport/test/core_ext/pathname_test.rb new file mode 100644 index 0000000000..3f49b665b2 --- /dev/null +++ b/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 -- cgit v1.2.3