>> app.url_for(:controller=>"berryz", :action=>"show", :id=>"maiha") => "http://www.example.test/berryz/show/maiha" def app(create=false) @app_integration_instance = nil if create @app_integration_instance ||= new_session do |sess| sess.host! "www.example.test" end end def new_session session = ActionController::Integration::Session.new yield session if block_given? session end