aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2010-09-05 22:06:43 -0300
committerJosé Valim <jose.valim@gmail.com>2010-09-06 13:40:45 +0200
commit11fccc5f06bc67353b895eeeb65cfab94cb4cd25 (patch)
tree22f9c1970bdb16f54a19c852dc9a0d48e9d7c692 /actionpack/test
parented2650646ec9bd1103d6c049db8df99b7313d6b1 (diff)
downloadrails-11fccc5f06bc67353b895eeeb65cfab94cb4cd25.tar.gz
rails-11fccc5f06bc67353b895eeeb65cfab94cb4cd25.tar.bz2
rails-11fccc5f06bc67353b895eeeb65cfab94cb4cd25.zip
Cleanup deprecation warnings in Action Controller
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/helper_test.rb13
-rw-r--r--actionpack/test/controller/log_subscriber_test.rb13
-rw-r--r--actionpack/test/controller/resources_test.rb30
3 files changed, 1 insertions, 55 deletions
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb
index 9093fa9e17..9f0670ffdf 100644
--- a/actionpack/test/controller/helper_test.rb
+++ b/actionpack/test/controller/helper_test.rb
@@ -42,7 +42,7 @@ class JustMeController < ActionController::Base
def flash
render :inline => "<h1><%= notice %></h1>"
end
-
+
def lib
render :inline => '<%= useful_function %>'
end
@@ -178,17 +178,6 @@ class HelperTest < ActiveSupport::TestCase
assert methods.include?('foobar')
end
- def test_deprecation
- assert_deprecated do
- ActionController::Base.helpers_dir = "some/foo/bar"
- end
- assert_deprecated do
- assert_equal ["some/foo/bar"], ActionController::Base.helpers_dir
- end
- ensure
- ActionController::Base.helpers_path = File.expand_path('../../fixtures/helpers', __FILE__)
- end
-
private
def expected_helper_methods
TestHelper.instance_methods.map {|m| m.to_s }
diff --git a/actionpack/test/controller/log_subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb
index 0a18741f0c..414eec4f9d 100644
--- a/actionpack/test/controller/log_subscriber_test.rb
+++ b/actionpack/test/controller/log_subscriber_test.rb
@@ -16,10 +16,6 @@ module Another
send_data "cool data", :filename => "file.txt"
end
- def xfile_sender
- send_file File.expand_path("company.rb", FIXTURE_LOAD_PATH), :x_sendfile => true
- end
-
def file_sender
send_file File.expand_path("company.rb", FIXTURE_LOAD_PATH)
end
@@ -133,15 +129,6 @@ class ACLogSubscriberTest < ActionController::TestCase
assert_match /test\/fixtures\/company\.rb/, logs[1]
end
- def test_send_xfile
- assert_deprecated { get :xfile_sender }
- wait
-
- assert_equal 3, logs.size
- assert_match /Sent file/, logs[1]
- assert_match /test\/fixtures\/company\.rb/, logs[1]
- end
-
def test_with_fragment_cache
@controller.config.perform_caching = true
get :with_fragment_cache
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index b59fd65a3e..acb4617a60 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -658,36 +658,6 @@ class ResourcesTest < ActionController::TestCase
end
end
- def test_resource_action_separator
- with_routing do |set|
- set.draw do
- scope '/threads/:thread_id' do
- resources :messages, :as => :thread_messages do
- get :search, :on => :collection
- match :preview, :on => :new
- end
- end
- scope '/admin' do
- resource :account, :as => :admin_account do
- get :login, :on => :member
- match :preview, :on => :new
- end
- end
- end
-
- action_separator = ActionController::Base.resource_action_separator
-
- assert_simply_restful_for :messages, :name_prefix => 'thread_', :path_prefix => 'threads/1/', :options => { :thread_id => '1' }
- assert_named_route "/threads/1/messages#{action_separator}search", "search_thread_messages_path", {}
- assert_named_route "/threads/1/messages/new", "new_thread_message_path", {}
- assert_named_route "/threads/1/messages/new#{action_separator}preview", "preview_new_thread_message_path", {}
- assert_singleton_restful_for :account, :name_prefix => 'admin_', :path_prefix => 'admin/'
- assert_named_route "/admin/account#{action_separator}login", "login_admin_account_path", {}
- assert_named_route "/admin/account/new", "new_admin_account_path", {}
- assert_named_route "/admin/account/new#{action_separator}preview", "preview_new_admin_account_path", {}
- end
- end
-
def test_new_style_named_routes_for_resource
with_routing do |set|
set.draw do