Skip to content

Commit f006de5

Browse files
committed
Fix broken alignments caused by auto-correct commit 411ccbd
Hash syntax auto-correcting breaks alignments. 411ccbd
1 parent 67d0c9e commit f006de5

File tree

20 files changed

+77
-39
lines changed

20 files changed

+77
-39
lines changed

actionpack/test/abstract/translation_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class TranslationController < AbstractController::Base
99
class TranslationControllerTest < ActiveSupport::TestCase
1010
def setup
1111
@controller = TranslationController.new
12-
I18n.backend.store_translations(:en, one: {
12+
I18n.backend.store_translations(:en,
13+
one: {
1314
two: "bar",
1415
},
1516
abstract_controller: {

actionpack/test/controller/new_base/render_action_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ class ControllerLayoutTest < Rack::TestCase
258258

259259
module RenderActionWithBothLayouts
260260
class BasicController < ActionController::Base
261-
self.view_paths = [ActionView::FixtureResolver.new( "render_action_with_both_layouts/basic/hello_world.html.erb" => "Hello World!",
261+
self.view_paths = [ActionView::FixtureResolver.new(
262+
"render_action_with_both_layouts/basic/hello_world.html.erb" => "Hello World!",
262263
"layouts/application.html.erb" => "Oh Hi <%= yield %> Bye",
263264
"layouts/render_action_with_both_layouts/basic.html.erb" => "With Controller Layout! <%= yield %> Bye")]
264265

actionpack/test/controller/parameters/always_permitted_parameters_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def teardown
1919
end
2020

2121
test "permits parameters that are whitelisted" do
22-
params = ActionController::Parameters.new( book: { pages: 65 },
22+
params = ActionController::Parameters.new(
23+
book: { pages: 65 },
2324
format: "json")
2425
permitted = params.permit book: [:pages]
2526
assert permitted.permitted?

actionpack/test/controller/parameters/log_on_unpermitted_params_test.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def teardown
1111
end
1212

1313
test "logs on unexpected param" do
14-
params = ActionController::Parameters.new( book: { pages: 65 },
14+
params = ActionController::Parameters.new(
15+
book: { pages: 65 },
1516
fishing: "Turnips")
1617

1718
assert_logged("Unpermitted parameter: fishing") do
@@ -20,7 +21,8 @@ def teardown
2021
end
2122

2223
test "logs on unexpected params" do
23-
params = ActionController::Parameters.new( book: { pages: 65 },
24+
params = ActionController::Parameters.new(
25+
book: { pages: 65 },
2426
fishing: "Turnips",
2527
car: "Mersedes")
2628

@@ -30,15 +32,17 @@ def teardown
3032
end
3133

3234
test "logs on unexpected nested param" do
33-
params = ActionController::Parameters.new( book: { pages: 65, title: "Green Cats and where to find then." })
35+
params = ActionController::Parameters.new(
36+
book: { pages: 65, title: "Green Cats and where to find then." })
3437

3538
assert_logged("Unpermitted parameter: title") do
3639
params.permit(book: [:pages])
3740
end
3841
end
3942

4043
test "logs on unexpected nested params" do
41-
params = ActionController::Parameters.new( book: { pages: 65, title: "Green Cats and where to find then.", author: "G. A. Dog" })
44+
params = ActionController::Parameters.new(
45+
book: { pages: 65, title: "Green Cats and where to find then.", author: "G. A. Dog" })
4246

4347
assert_logged("Unpermitted parameters: title, author") do
4448
params.permit(book: [:pages])

actionpack/test/controller/parameters/multi_parameter_attributes_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
class MultiParameterAttributesTest < ActiveSupport::TestCase
55
test "permitted multi-parameter attribute keys" do
6-
params = ActionController::Parameters.new( book: {
6+
params = ActionController::Parameters.new(
7+
book: {
78
"shipped_at(1i)" => "2012",
89
"shipped_at(2i)" => "3",
910
"shipped_at(3i)" => "25",

actionpack/test/controller/parameters/nested_parameters_permit_test.rb

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ def assert_filtered_out(params, key)
77
end
88

99
test "permitted nested parameters" do
10-
params = ActionController::Parameters.new( book: {
10+
params = ActionController::Parameters.new(
11+
book: {
1112
title: "Romeo and Juliet",
1213
authors: [{
1314
name: "William Shakespeare",
@@ -43,7 +44,8 @@ def assert_filtered_out(params, key)
4344
end
4445

4546
test "permitted nested parameters with a string or a symbol as a key" do
46-
params = ActionController::Parameters.new( book: {
47+
params = ActionController::Parameters.new(
48+
book: {
4749
"authors" => [
4850
{ name: "William Shakespeare", born: "1564-04-26" },
4951
{ name: "Christopher Marlowe" }
@@ -66,7 +68,8 @@ def assert_filtered_out(params, key)
6668
end
6769

6870
test "nested arrays with strings" do
69-
params = ActionController::Parameters.new( book: {
71+
params = ActionController::Parameters.new(
72+
book: {
7073
genres: ["Tragedy"]
7174
})
7275

@@ -75,7 +78,8 @@ def assert_filtered_out(params, key)
7578
end
7679

7780
test "permit may specify symbols or strings" do
78-
params = ActionController::Parameters.new( book: {
81+
params = ActionController::Parameters.new(
82+
book: {
7983
title: "Romeo and Juliet",
8084
author: "William Shakespeare"
8185
},
@@ -88,7 +92,8 @@ def assert_filtered_out(params, key)
8892
end
8993

9094
test "nested array with strings that should be hashes" do
91-
params = ActionController::Parameters.new( book: {
95+
params = ActionController::Parameters.new(
96+
book: {
9297
genres: ["Tragedy"]
9398
})
9499

@@ -97,7 +102,8 @@ def assert_filtered_out(params, key)
97102
end
98103

99104
test "nested array with strings that should be hashes and additional values" do
100-
params = ActionController::Parameters.new( book: {
105+
params = ActionController::Parameters.new(
106+
book: {
101107
title: "Romeo and Juliet",
102108
genres: ["Tragedy"]
103109
})
@@ -108,7 +114,8 @@ def assert_filtered_out(params, key)
108114
end
109115

110116
test "nested string that should be a hash" do
111-
params = ActionController::Parameters.new( book: {
117+
params = ActionController::Parameters.new(
118+
book: {
112119
genre: "Tragedy"
113120
})
114121

@@ -117,7 +124,8 @@ def assert_filtered_out(params, key)
117124
end
118125

119126
test "fields_for-style nested params" do
120-
params = ActionController::Parameters.new( book: {
127+
params = ActionController::Parameters.new(
128+
book: {
121129
authors_attributes: {
122130
'0': { name: "William Shakespeare", age_of_death: "52" },
123131
'1': { name: "Unattributed Assistant" },
@@ -136,7 +144,8 @@ def assert_filtered_out(params, key)
136144
end
137145

138146
test "fields_for-style nested params with negative numbers" do
139-
params = ActionController::Parameters.new( book: {
147+
params = ActionController::Parameters.new(
148+
book: {
140149
authors_attributes: {
141150
'-1': { name: "William Shakespeare", age_of_death: "52" },
142151
'-2': { name: "Unattributed Assistant" }
@@ -153,7 +162,8 @@ def assert_filtered_out(params, key)
153162
end
154163

155164
test "nested number as key" do
156-
params = ActionController::Parameters.new( product: {
165+
params = ActionController::Parameters.new(
166+
product: {
157167
properties: {
158168
"0" => "prop0",
159169
"1" => "prop1"

actionpack/test/controller/parameters/raise_on_unpermitted_params_test.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def teardown
1111
end
1212

1313
test "raises on unexpected params" do
14-
params = ActionController::Parameters.new( book: { pages: 65 },
14+
params = ActionController::Parameters.new(
15+
book: { pages: 65 },
1516
fishing: "Turnips")
1617

1718
assert_raises(ActionController::UnpermittedParameters) do
@@ -20,7 +21,8 @@ def teardown
2021
end
2122

2223
test "raises on unexpected nested params" do
23-
params = ActionController::Parameters.new( book: { pages: 65, title: "Green Cats and where to find then." })
24+
params = ActionController::Parameters.new(
25+
book: { pages: 65, title: "Green Cats and where to find then." })
2426

2527
assert_raises(ActionController::UnpermittedParameters) do
2628
params.permit(book: [:pages])

actionpack/test/controller/routing_test.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ def setup
2929

3030
def test_route_generation_escapes_unsafe_path_characters
3131
assert_equal "/content/act#{@escaped}ion/var#{@escaped}iable/add#{@escaped}itional-1/add#{@escaped}itional-2",
32-
url_for(@set, controller: "content",
32+
url_for(@set,
33+
controller: "content",
3334
action: "act#{@segment}ion",
3435
variable: "var#{@segment}iable",
3536
additional: ["add#{@segment}itional-1", "add#{@segment}itional-2"])
@@ -45,7 +46,8 @@ def test_route_recognition_unescapes_path_components
4546

4647
def test_route_generation_allows_passing_non_string_values_to_generated_helper
4748
assert_equal "/content/action/variable/1/2",
48-
url_for(@set, controller: "content",
49+
url_for(@set,
50+
controller: "content",
4951
action: "action",
5052
variable: "variable",
5153
additional: [1, 2])
@@ -776,7 +778,8 @@ def test_nil_defaults
776778
end
777779
end
778780

779-
assert_equal "/journal", url_for(rs, controller: "content",
781+
assert_equal "/journal", url_for(rs,
782+
controller: "content",
780783
action: "list_journal",
781784
date: nil,
782785
user_id: nil)

actionpack/test/journey/route_test.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@ def test_format_with_star
5050
path = Path::Pattern.from_string "/:controller/*extra"
5151
route = Route.build("name", nil, path, {}, [],
5252
controller: "foo", action: "bar")
53-
assert_equal "/foo/himom", route.format( controller: "foo",
53+
assert_equal "/foo/himom", route.format(
54+
controller: "foo",
5455
extra: "himom")
5556
end
5657

5758
def test_connects_all_match
5859
path = Path::Pattern.from_string "/:controller(/:action(/:id(.:format)))"
5960
route = Route.build("name", nil, path, {action: "bar"}, [], controller: "foo")
6061

61-
assert_equal "/foo/bar/10", route.format( controller: "foo",
62+
assert_equal "/foo/bar/10", route.format(
63+
controller: "foo",
6264
action: "bar",
6365
id: 10)
6466
end

actionview/test/actionpack/controller/view_paths_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def find_all(*args)
131131
"Decorated body",
132132
template.identifier,
133133
template.handler,
134-
virtual_path: template.virtual_path,
134+
virtual_path: template.virtual_path,
135135
format: template.formats
136136
)
137137
end

0 commit comments

Comments
 (0)