diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-10-10 17:15:11 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-10-10 17:15:11 +0100 |
commit | 66ee2654ff243f03595a402fa15e1eea1b5b45be (patch) | |
tree | 3f1055e03082f0c767719e8cba5155e4207779e0 /railties/test/isolation | |
parent | dd2779e1b83b4d867d47dd286ec0c919f5df12a9 (diff) | |
parent | b9ce8216fa849a47ad0b0f99fa510e226a23c12e (diff) | |
download | rails-66ee2654ff243f03595a402fa15e1eea1b5b45be.tar.gz rails-66ee2654ff243f03595a402fa15e1eea1b5b45be.tar.bz2 rails-66ee2654ff243f03595a402fa15e1eea1b5b45be.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'railties/test/isolation')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 869e8429cf..f83e0151a4 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -7,6 +7,8 @@ # It is also good to know what is the bare minimum to get # Rails booted up. +require 'fileutils' + # TODO: Remove rubygems when possible require 'rubygems' require 'test/unit' @@ -30,6 +32,14 @@ module TestHelpers def app_path(*args) tmp_path(*%w[app] + args) end + + def framework_path + RAILS_FRAMEWORK_ROOT + end + + def rails_root + app_path + end end module Rack @@ -87,7 +97,8 @@ module TestHelpers end def app_file(path, contents) - File.open(app_path(path), 'w') do |f| + FileUtils.mkdir_p File.dirname("#{app_path}/#{path}") + File.open("#{app_path}/#{path}", 'w') do |f| f.puts contents end end |