aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-03-10 11:19:32 -0500
committerJoshua Peek <josh@joshpeek.com>2009-03-10 11:19:32 -0500
commite8b07dc340441d4d15889cb14ee9f0f00a1ecd30 (patch)
tree75ce5e273f12098aab300472d8ebffb8f1a0b60c
parentc3aa2bcdcffb42f578b0e89fe08e1c4e234ccf3b (diff)
downloadrails-e8b07dc340441d4d15889cb14ee9f0f00a1ecd30.tar.gz
rails-e8b07dc340441d4d15889cb14ee9f0f00a1ecd30.tar.bz2
rails-e8b07dc340441d4d15889cb14ee9f0f00a1ecd30.zip
Ensure public folder structure is setup correctly if the tests are ran out of order, fixes tests in 0c9bbf8
-rw-r--r--railties/test/fixtures/public/foo/bar.html (renamed from railties/test/public/foo/bar.html)0
-rw-r--r--railties/test/fixtures/public/foo/index.html (renamed from railties/test/public/foo/index.html)0
-rw-r--r--railties/test/fixtures/public/index.html (renamed from railties/test/public/index.html)0
-rw-r--r--railties/test/rack_static_test.rb8
4 files changed, 8 insertions, 0 deletions
diff --git a/railties/test/public/foo/bar.html b/railties/test/fixtures/public/foo/bar.html
index 9a35646205..9a35646205 100644
--- a/railties/test/public/foo/bar.html
+++ b/railties/test/fixtures/public/foo/bar.html
diff --git a/railties/test/public/foo/index.html b/railties/test/fixtures/public/foo/index.html
index 497a2e898f..497a2e898f 100644
--- a/railties/test/public/foo/index.html
+++ b/railties/test/fixtures/public/foo/index.html
diff --git a/railties/test/public/index.html b/railties/test/fixtures/public/index.html
index 525950ba6b..525950ba6b 100644
--- a/railties/test/public/index.html
+++ b/railties/test/fixtures/public/index.html
diff --git a/railties/test/rack_static_test.rb b/railties/test/rack_static_test.rb
index 5449751002..ad673f6f19 100644
--- a/railties/test/rack_static_test.rb
+++ b/railties/test/rack_static_test.rb
@@ -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!"]]
}