aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/console_app.rb
blob: f943d5ab49a53a309d0fb93083c3927e855e56ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'action_controller/integration_test'

# work around the at_exit hook in test/unit, which kills IRB
Test::Unit.run = true

def app(create=false)
  @app_integration_instance = nil if create
  unless @app_integration_instance
    @app_integration_instance = ActionController::Integration::Session.new
    @app_integration_instance.host! "www.example.test"
  end
  @app_integration_instance
end