Skip to content

Commit 432a95d

Browse files
committed
Merge pull request rails#4342 from carlosantoniodasilva/fix-routing-test
Fix routing test and remove deprecated method
2 parents 705b29b + 68367fd commit 432a95d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

actionpack/lib/action_dispatch/middleware/remote_ip.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def call(env)
3333

3434
class GetIp
3535
def initialize(env, middleware)
36-
@env = env
37-
@middleware = middleware
36+
@env = env
37+
@middleware = middleware
3838
@calculated_ip = false
3939
end
4040

actionpack/test/controller/action_pack_assertions_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def test_response_object
338338
end
339339

340340
def test_render_based_on_parameters
341-
process :render_based_on_parameters, "name" => "David"
341+
process :render_based_on_parameters, "GET", "name" => "David"
342342
assert_equal "Mr. David", @response.body
343343
end
344344

actionpack/test/dispatch/routing_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1443,10 +1443,10 @@ def test_nested_optional_scoped_path
14431443
def test_nested_optional_path_shorthand
14441444
with_test_routes do
14451445
get '/registrations/new'
1446-
assert @request.params[:locale].nil?
1446+
assert_nil @request.params[:locale]
14471447

14481448
get '/en/registrations/new'
1449-
assert 'en', @request.params[:locale]
1449+
assert_equal 'en', @request.params[:locale]
14501450
end
14511451
end
14521452

0 commit comments

Comments
 (0)