1 require 'action_controller/integration'
3 # work around the at_exit hook in test/unit, which kills IRB
4 Test
::Unit.run
= true if Test
::Unit.respond_to
?(:run=)
6 # reference the global "app" instance, created on demand. To recreate the
7 # instance, pass a non-false value as the parameter.
9 @app_integration_instance = nil if create
10 @app_integration_instance ||= new_session
do |sess
|
11 sess
.host
! "www.example.com"
15 # create a new session. If a block is given, the new session will be yielded
16 # to the block before being returned.
18 session
= ActionController
::Integration::Session.new
19 yield session
if block_given
?
23 #reloads the environment
26 dispatcher
= ActionController
::Dispatcher.new($stdout)
27 dispatcher
.cleanup_application
28 dispatcher
.reload_application