From 93df3b2d15d024068eb7c9c5f2f6f9a5c4695947 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Fri, 6 Jan 2012 04:08:11 -0200 Subject: Fix routing test to use assert_equal --- actionpack/lib/action_dispatch/middleware/remote_ip.rb | 4 ++-- actionpack/test/dispatch/routing_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/middleware/remote_ip.rb b/actionpack/lib/action_dispatch/middleware/remote_ip.rb index 66ece60860..030ccb2017 100644 --- a/actionpack/lib/action_dispatch/middleware/remote_ip.rb +++ b/actionpack/lib/action_dispatch/middleware/remote_ip.rb @@ -33,8 +33,8 @@ module ActionDispatch class GetIp def initialize(env, middleware) - @env = env - @middleware = middleware + @env = env + @middleware = middleware @calculated_ip = false end diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index d5c1586600..e5ed11d1ea 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -1443,10 +1443,10 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest def test_nested_optional_path_shorthand with_test_routes do get '/registrations/new' - assert @request.params[:locale].nil? + assert_nil @request.params[:locale] get '/en/registrations/new' - assert 'en', @request.params[:locale] + assert_equal 'en', @request.params[:locale] end end -- cgit v1.2.3 From 68367fd570fa9fa96b870d9abc66bc4a14fda113 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Fri, 6 Jan 2012 09:25:40 -0200 Subject: Remove deprecation warning from test related to old process api --- actionpack/test/controller/action_pack_assertions_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index bdbf158b36..01cafe1aca 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -338,7 +338,7 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase end def test_render_based_on_parameters - process :render_based_on_parameters, "name" => "David" + process :render_based_on_parameters, "GET", "name" => "David" assert_equal "Mr. David", @response.body end -- cgit v1.2.3