diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/app_rails_loader_test.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/railties/test/app_rails_loader_test.rb b/railties/test/app_rails_loader_test.rb index a16b8d3302..ceae78ae80 100644 --- a/railties/test/app_rails_loader_test.rb +++ b/railties/test/app_rails_loader_test.rb @@ -1,11 +1,10 @@ require 'tmpdir' -require 'pathname' require 'abstract_unit' require 'rails/app_rails_loader' class AppRailsLoaderTest < ActiveSupport::TestCase def write(filename, contents=nil) - FileUtils.mkdir_p(Pathname.new(filename).dirname) + FileUtils.mkdir_p(File.dirname(filename)) File.write(filename, contents) end @@ -13,10 +12,6 @@ class AppRailsLoaderTest < ActiveSupport::TestCase Rails::AppRailsLoader.expects(:exec).with(Rails::AppRailsLoader::RUBY, exe) end - def realpath(filename) - Pathname.new(filename).realpath - end - setup do @tmp = Dir.mktmpdir('railties-rails-loader-test-suite') @cwd = Dir.pwd @@ -61,7 +56,7 @@ class AppRailsLoaderTest < ActiveSupport::TestCase # This happens in particular in Mac OS X, where @tmp starts # with "/var", and Dir.pwd with "/private/var", due to a # default system symlink var -> private/var. - assert_equal realpath("#@tmp/foo"), realpath(Dir.pwd) + assert_equal File.realpath("#@tmp/foo"), File.realpath(Dir.pwd) end end end |