Ensure public folder structure is setup correctly if the tests are ran out of order, fixes tests in 0c9bbf8

This commit is contained in:
Joshua Peek 2009-03-10 11:19:32 -05:00
parent c3aa2bcdcf
commit e8b07dc340
4 changed files with 8 additions and 0 deletions

View File

@ -4,6 +4,14 @@ require 'action_controller'
require 'rails/rack'
class RackStaticTest < ActiveSupport::TestCase
def setup
FileUtils.cp_r "#{RAILS_ROOT}/fixtures/public", "#{RAILS_ROOT}/public"
end
def teardown
FileUtils.rm_rf "#{RAILS_ROOT}/public"
end
DummyApp = lambda { |env|
[200, {"Content-Type" => "text/plain"}, ["Hello, World!"]]
}