diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-13 16:21:41 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-14 12:46:23 -0300 |
commit | 4c16791f355c74f8e6ad916e67fd4ae81efbf708 (patch) | |
tree | 4d0bac9dddd90c1b7ffaea3f309e79c0b7468154 /railties/test | |
parent | cc1c4acc8eeee4287627b1d184d7d04a22eddb27 (diff) | |
download | rails-4c16791f355c74f8e6ad916e67fd4ae81efbf708.tar.gz rails-4c16791f355c74f8e6ad916e67fd4ae81efbf708.tar.bz2 rails-4c16791f355c74f8e6ad916e67fd4ae81efbf708.zip |
Add ActionController::HTTP
More info http://edgeguides.rubyonrails.org/api_app.html
[Carlos Antonio da Silva & Santiago Pastorino]
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index a08e5b2374..cb321f0dd4 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -130,6 +130,33 @@ module ApplicationTests assert_equal "false", last_response.body end + test "action_controller http initializes successfully" do + app_file "app/controllers/application_controller.rb", <<-RUBY + class ApplicationController < ActionController::HTTP + end + RUBY + + app_file "app/controllers/omg_controller.rb", <<-RUBY + class OmgController < ApplicationController + def show + render :json => { :omg => 'omg' } + end + end + RUBY + + app_file "config/routes.rb", <<-RUBY + AppTemplate::Application.routes.draw do + match "/:controller(/:action)" + end + RUBY + + require 'rack/test' + extend Rack::Test::Methods + + get '/omg/show' + assert_equal '{"omg":"omg"}', last_response.body + end + # AD test "action_dispatch extensions are applied to ActionDispatch" do add_to_config "config.action_dispatch.tld_length = 2" |