Skip to content

Commit

Permalink
just require things once
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Dec 21, 2011
1 parent d4a4fcb commit 401b266
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions railties/test/application/configuration_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "isolation/abstract_unit"
require 'rack/test'

class ::MyMailInterceptor
def self.delivering_email(email); email; end
Expand All @@ -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")
Expand Down Expand Up @@ -181,8 +183,6 @@ def teardown
assert !$prepared

require "#{app_path}/config/environment"
require 'rack/test'
extend Rack::Test::Methods

get "/"
assert $prepared
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 401b266

Please sign in to comment.