aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-12-21 15:03:43 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-12-21 15:03:43 -0700
commit401b266f5fc1e6c5f13feb36122a1983989d8f58 (patch)
tree9b87afbd20027911d4dd84e4530d61e44e373e27 /railties
parentd4a4fcbc936818e1925781caa3ba735df77866da (diff)
downloadrails-401b266f5fc1e6c5f13feb36122a1983989d8f58.tar.gz
rails-401b266f5fc1e6c5f13feb36122a1983989d8f58.tar.bz2
rails-401b266f5fc1e6c5f13feb36122a1983989d8f58.zip
just require things once
Diffstat (limited to 'railties')
-rw-r--r--railties/test/application/configuration_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
index 30748674cd..758b56d17d 100644
--- a/railties/test/application/configuration_test.rb
+++ b/railties/test/application/configuration_test.rb
@@ -1,4 +1,5 @@
require "isolation/abstract_unit"
+require 'rack/test'
class ::MyMailInterceptor
def self.delivering_email(email); email; end
@@ -15,6 +16,7 @@ class ::MyOtherMailObserver < ::MyMailObserver; end
module ApplicationTests
class ConfigurationTest < Test::Unit::TestCase
include ActiveSupport::Testing::Isolation
+ include Rack::Test::Methods
def new_app
File.expand_path("#{app_path}/../new_app")
@@ -181,8 +183,6 @@ module ApplicationTests
assert !$prepared
require "#{app_path}/config/environment"
- require 'rack/test'
- extend Rack::Test::Methods
get "/"
assert $prepared
@@ -485,8 +485,6 @@ module ApplicationTests
RUBY
require "#{app_path}/config/environment"
- require "rack/test"
- extend Rack::Test::Methods
post "/posts.json", '{ "title": "foo", "name": "bar" }', "CONTENT_TYPE" => "application/json"
assert_equal '{"title"=>"foo"}', last_response.body