diff options
Diffstat (limited to 'railties/test/isolation/abstract_unit.rb')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index a55ee6c01d..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' @@ -31,6 +33,10 @@ module TestHelpers tmp_path(*%w[app] + args) end + def framework_path + RAILS_FRAMEWORK_ROOT + end + def rails_root app_path end @@ -91,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 |