rails--rails/actionview/test/template
Yasuo Honda 40db515e91 Address `warning: Passing only keyword arguments`
This pull request addresses the following warnings enabled since ruby/ruby#4070

* Warnings without this fix 1

```
% ruby -v
ruby 3.1.0dev (2021-02-01T10:54:21Z master 1cdae49d39) [x86_64-darwin20]
% bin/test test/cases/arel/visitors/sqlite_test.rb:36
... snip ...
/Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/arel/support/fake_record.rb:98: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
.

Finished in 0.003538s, 2261.1645 runs/s, 2543.8101 assertions/s.
8 runs, 9 assertions, 0 failures, 0 errors, 0 skips
%
```

* Warnings without this fix 2

```ruby
% ruby -v
ruby 3.1.0dev (2021-02-01T10:54:21Z master 1cdae49d39) [x86_64-darwin20]
% bin/test test/cases/type/adapter_specific_registry_test.rb
Using sqlite3
Run options: --seed 53175

......./Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/type/adapter_specific_registry_test.rb:126: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
/Users/yahonda/src/github.com/rails/rails/activemodel/lib/active_model/type/registry.rb:18: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
/Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/type/adapter_specific_registry_test.rb:130: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
/Users/yahonda/src/github.com/rails/rails/activemodel/lib/active_model/type/registry.rb:18: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
.../Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/type/adapter_specific_registry_test.rb:85: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
/Users/yahonda/src/github.com/rails/rails/activemodel/lib/active_model/type/registry.rb:18: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
/Users/yahonda/src/github.com/rails/rails/activerecord/test/cases/type/adapter_specific_registry_test.rb:86: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
/Users/yahonda/src/github.com/rails/rails/activemodel/lib/active_model/type/registry.rb:18: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
.

Finished in 0.011424s, 962.8852 runs/s, 2450.9804 assertions/s.
11 runs, 28 assertions, 0 failures, 0 errors, 0 skips
%
```

* Warnings without this fix 3

```ruby
$ cd actionview
$ bin/test test/template/url_helper_test.rb
Run options: --seed 27105

........................../home/yahonda/src/github.com/rails/rails/actionview/test/template/url_helper_test.rb:88: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
.............................../home/yahonda/src/github.com/rails/rails/actionview/test/template/url_helper_test.rb:94: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
..................................................../home/yahonda/src/github.com/rails/rails/actionview/test/template/url_helper_test.rb:71: warning: Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).
......................

Finished in 0.305066s, 429.4159 runs/s, 580.2032 assertions/s.
131 runs, 177 assertions, 0 failures, 0 errors, 0 skips
$
```

Refer:
ruby/ruby#4070
https://bugs.ruby-lang.org/issues/16806

Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
2021-02-02 21:59:08 +09:00
..
erb Allow Erubi bufvar to be configured 2020-05-21 15:22:51 -05:00
form_helper Yield translation to `FormBuilder#button` block 2020-10-30 16:30:56 -04:00
testing
active_model_helper_test.rb
asset_tag_helper_test.rb Rename the config to make clear it is a boolean 2021-01-27 00:31:16 +00:00
atom_feed_helper_test.rb feat(rubocop): Add Style/RedundantRegexpEscape 2020-12-08 18:57:09 +00:00
capture_helper_test.rb
compiled_templates_test.rb
controller_helper_test.rb
csp_helper_test.rb
csrf_helper_test.rb form_authenticity_token takes keyword arguments 2019-09-15 03:05:52 +09:00
date_helper_i18n_test.rb
date_helper_test.rb Add label attribute to <option> from include_blank 2020-07-24 15:45:18 -05:00
dependency_tracker_test.rb Ignore interpolated strings in DependencyTracker 2020-04-27 10:10:45 -07:00
digestor_test.rb
erb_util_test.rb
fallback_file_system_resolver_test.rb Deprecate rendering templates with . in the name 2020-05-05 23:21:17 -07:00
file_system_resolver_test.rb
form_collections_helper_test.rb
form_helper_test.rb Translate FormBuilder#button calls with formmethod: 2021-01-08 18:21:02 -05:00
form_options_helper_i18n_test.rb
form_options_helper_test.rb [v6.1.0.rc1] Fix regression for select tag helper with array (#40522) 2020-11-03 13:27:51 -05:00
form_tag_helper_test.rb Merge pull request #40168 from igor04/disable_with_and_automatically_disable_submit_tag 2020-12-09 13:38:44 -05:00
html_test.rb
javascript_helper_test.rb Fix possible XSS vector in JS escape helper 2020-03-19 09:48:08 -07:00
log_subscriber_test.rb Make the arguments of ActionView::Base#initialize required 2020-10-30 00:25:24 +00:00
lookup_context_test.rb Remove deprecated `rendered_format` from `ActionView::LookupContext` 2020-10-30 00:25:26 +00:00
number_helper_test.rb
optimized_file_system_resolver_test.rb
output_safety_helper_test.rb
partial_iteration_test.rb fix require 2020-02-27 14:12:09 -08:00
record_identifier_test.rb
render_test.rb Require that `ActionView::Base` subclasses implement `#compiled_method_container` 2020-10-30 00:25:24 +00:00
resolver_cache_test.rb
resolver_shared_tests.rb Introduce Resolver::PathParser 2020-05-19 18:55:10 -07:00
sanitize_helper_test.rb Call class method since sanitizer's instance method is private and add tests 2020-12-08 22:32:49 +00:00
streaming_render_test.rb Remove deprecated support to passing relative paths to `render file:` 2020-10-30 00:25:14 +00:00
tag_helper_test.rb Escape HTML attributes for ERB interpolation (#40657) 2020-11-28 11:01:15 +01:00
template_error_test.rb
template_test.rb Revert "Remove redundant @virtual_path variable" 2020-12-30 14:07:09 +01:00
test_case_test.rb Use unique controller per ActionView::TestCase 2020-09-02 15:55:01 -07:00
test_test.rb
text_helper_test.rb
text_test.rb
translation_helper_test.rb Failing test for lazy translation in partial with block 2020-12-30 14:07:09 +01:00
url_helper_test.rb Address `warning: Passing only keyword arguments` 2021-02-02 21:59:08 +09:00