diff options
author | Jamis Buck <jamis@37signals.com> | 2005-06-25 09:20:38 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-06-25 09:20:38 +0000 |
commit | 17928b73473c0e15d51969a1426253b70af9eb09 (patch) | |
tree | d58713c715f1c765f216ad1275524632ace55a54 /actionpack/test | |
parent | ebb6fb09280f828258432223fd543de9dfda6370 (diff) | |
download | rails-17928b73473c0e15d51969a1426253b70af9eb09.tar.gz rails-17928b73473c0e15d51969a1426253b70af9eb09.tar.bz2 rails-17928b73473c0e15d51969a1426253b70af9eb09.zip |
Eliminate a "string literal in condition" warning from some routes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1502 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 0a9453e86a..3687b6ac77 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1,5 +1,6 @@ require File.dirname(__FILE__) + '/../abstract_unit' require 'test/unit' +require 'stringio' RunTimeTests = ARGV.include? 'time' @@ -629,6 +630,17 @@ class RouteSetTests < Test::Unit::TestCase end end + def test_route_generating_string_literal_in_comparison_warning + old_stderr = $stderr + $stderr = StringIO.new + rs.draw do |map| + map.connect 'subscriptions/:action/:subscription_type', :controller => "subscriptions" + end + assert_equal "", $stderr.string + ensure + $stderr = old_stderr + end + def test_basic_named_route rs.home '', :controller => 'content', :action => 'list' x = setup_for_named_route |