Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6690d66292
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (33 sloc) 0.935 kb
require 'isolation/abstract_unit'
module ApplicationTests
class UrlGenerationTest < Test::Unit::TestCase
include ActiveSupport::Testing::Isolation
def app
Rails.application
end
test "it works" do
boot_rails
require "rails"
require "action_controller/railtie"
class MyApp < Rails::Application
config.secret_token = "3b7cd727ee24e8444053437c36cc66c4"
config.session_store :cookie_store, :key => "_myapp_session"
end
MyApp.initialize!
class ::ApplicationController < ActionController::Base
end
class ::OmgController < ::ApplicationController
def index
render :text => omg_path
end
end
MyApp.routes.draw do
match "/" => "omg#index", :as => :omg
end
require 'rack/test'
extend Rack::Test::Methods
get "/"
assert_equal "/", last_response.body
end
end
end
Jump to Line
Something went wrong with that request. Please try again.