diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-03 21:05:51 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-03 21:05:51 -0500 |
commit | 018b79dd36d054d87fdc408d38dc9ac7f1b1500d (patch) | |
tree | a954ecef58682b2d259432a04ce503f8bb865840 /actionpack/test/new_base/base_test.rb | |
parent | 84e94551f62d3bcbc71f1c6f3fda738342d984e2 (diff) | |
download | rails-018b79dd36d054d87fdc408d38dc9ac7f1b1500d.tar.gz rails-018b79dd36d054d87fdc408d38dc9ac7f1b1500d.tar.bz2 rails-018b79dd36d054d87fdc408d38dc9ac7f1b1500d.zip |
File extra test folders into controller, dispatch, or template
Diffstat (limited to 'actionpack/test/new_base/base_test.rb')
-rw-r--r-- | actionpack/test/new_base/base_test.rb | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/actionpack/test/new_base/base_test.rb b/actionpack/test/new_base/base_test.rb deleted file mode 100644 index effde324bc..0000000000 --- a/actionpack/test/new_base/base_test.rb +++ /dev/null @@ -1,68 +0,0 @@ -require 'abstract_unit' - -# Tests the controller dispatching happy path -module Dispatching - class SimpleController < ActionController::Base - def index - render :text => "success" - end - - def modify_response_body - self.response_body = "success" - end - - def modify_response_body_twice - ret = (self.response_body = "success") - self.response_body = "#{ret}!" - end - - def modify_response_headers - end - end - - class EmptyController < ActionController::Base ; end - - module Submodule - class ContainedEmptyController < ActionController::Base ; end - end - - class BaseTest < SimpleRouteCase - # :api: plugin - test "simple dispatching" do - get "/dispatching/simple/index" - - assert_body "success" - assert_status 200 - assert_content_type "text/html; charset=utf-8" - end - - # :api: plugin - test "directly modifying response body" do - get "/dispatching/simple/modify_response_body" - - assert_body "success" - end - - # :api: plugin - test "directly modifying response body twice" do - get "/dispatching/simple/modify_response_body_twice" - - assert_body "success!" - end - - test "controller path" do - assert_equal 'dispatching/empty', EmptyController.controller_path - assert_equal EmptyController.controller_path, EmptyController.new.controller_path - end - - test "namespaced controller path" do - assert_equal 'dispatching/submodule/contained_empty', Submodule::ContainedEmptyController.controller_path - assert_equal Submodule::ContainedEmptyController.controller_path, Submodule::ContainedEmptyController.new.controller_path - end - - test "controller name" do - assert_equal 'empty', EmptyController.controller_name - assert_equal 'contained_empty', Submodule::ContainedEmptyController.controller_name - end - end -end |