aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/test_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/test_test.rb')
-rw-r--r--actionpack/test/controller/test_test.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index 201fe03b44..0ebd6bc472 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -1,4 +1,5 @@
require File.dirname(__FILE__) + '/../abstract_unit'
+require File.dirname(__FILE__) + '/fake_controllers'
class TestTest < Test::Unit::TestCase
class TestController < ActionController::Base
@@ -52,12 +53,12 @@ HTML
def test_process_without_flash
process :set_flash
- assert_flash_equal "><", "test"
+ assert_equal '><', flash['test']
end
def test_process_with_flash
process :set_flash, nil, nil, { "test" => "value" }
- assert_flash_equal ">value<", "test"
+ assert_equal '>value<', flash['test']
end
def test_process_with_request_uri_with_no_params
@@ -100,10 +101,18 @@ HTML
:only => { :tag => "li" } } }
end
- def test_assert_routing
+ def test_assert_generates
assert_generates 'controller/action/5', :controller => 'controller', :action => 'action', :id => '5'
end
+ def test_assert_routing
+ assert_routing 'content', :controller => 'content', :action => 'index'
+ end
+
+ def test_assert_routing_in_module
+ assert_routing 'admin/user', :controller => 'admin/user', :action => 'index'
+ end
+
def test_params_passing
get :test_params, :page => {:name => "Page name", :month => '4', :year => '2004', :day => '6'}
parsed_params = eval(@response.body)