Permalink
Browse files

just require things once

  • Loading branch information...
1 parent d4a4fcb commit 401b266f5fc1e6c5f13feb36122a1983989d8f58 @tenderlove tenderlove committed Dec 21, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 railties/test/application/configuration_test.rb
View
6 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 @@ def teardown
assert !$prepared
require "#{app_path}/config/environment"
- require 'rack/test'
- extend Rack::Test::Methods
get "/"
assert $prepared
@@ -485,8 +485,6 @@ def create
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

0 comments on commit 401b266

Please sign in to comment.