diff options
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/abstract_unit.rb | 2 | ||||
-rw-r--r-- | actionview/test/actionpack/abstract/abstract_controller_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/activerecord/polymorphic_routes_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/form_helper_test.rb | 4 | ||||
-rw-r--r-- | actionview/test/template/lookup_context_test.rb | 4 | ||||
-rw-r--r-- | actionview/test/template/render_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/test_case_test.rb | 14 |
7 files changed, 15 insertions, 15 deletions
diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb index 3bb8d21e86..88c7189d22 100644 --- a/actionview/test/abstract_unit.rb +++ b/actionview/test/abstract_unit.rb @@ -264,7 +264,7 @@ module ActionDispatch class DebugExceptions private remove_method :stderr_logger - # Silence logger + # Silence logger def stderr_logger nil end diff --git a/actionview/test/actionpack/abstract/abstract_controller_test.rb b/actionview/test/actionpack/abstract/abstract_controller_test.rb index 863efd15fa..a2cd3deb58 100644 --- a/actionview/test/actionpack/abstract/abstract_controller_test.rb +++ b/actionview/test/actionpack/abstract/abstract_controller_test.rb @@ -227,7 +227,7 @@ module AbstractController end class ActionMissingRespondToActionController < AbstractController::Base - # No actions + # No actions private def action_missing(action_name) self.response_body = "success" diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index 952ed72aa9..8495949975 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -598,7 +598,7 @@ class PolymorphicRoutesTest < ActionController::TestCase end end - # Tests for uncountable names + # Tests for uncountable names def test_uncountable_resource with_test_routes do @series.save diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index e82905175a..395c4e4f41 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -1808,7 +1808,7 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal expected, output_buffer end - def test_form_for_with_symbol_object_name + def test_form_for_with_symbol_as form_for(@post, as: "other_name", html: { id: "create-post" }) do |f| concat f.label(:title, class: "post_title") concat f.text_field(:title) @@ -3120,7 +3120,7 @@ class FormHelperTest < ActionView::TestCase end def test_form_builder_does_not_have_form_for_method - assert !ActionView::Helpers::FormBuilder.instance_methods.include?(:form_for) + assert_not_includes ActionView::Helpers::FormBuilder.instance_methods, :form_for end def test_form_for_and_fields_for diff --git a/actionview/test/template/lookup_context_test.rb b/actionview/test/template/lookup_context_test.rb index 40d8d6f3b8..b47d92df34 100644 --- a/actionview/test/template/lookup_context_test.rb +++ b/actionview/test/template/lookup_context_test.rb @@ -120,8 +120,8 @@ class LookupContextTest < ActiveSupport::TestCase @lookup_context.with_fallbacks do assert_equal 3, @lookup_context.view_paths.size - assert @lookup_context.view_paths.include?(ActionView::FallbackFileSystemResolver.new("")) - assert @lookup_context.view_paths.include?(ActionView::FallbackFileSystemResolver.new("/")) + assert_includes @lookup_context.view_paths, ActionView::FallbackFileSystemResolver.new("") + assert_includes @lookup_context.view_paths, ActionView::FallbackFileSystemResolver.new("/") end end diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index 7c8a6aae47..e7e0b147c7 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -460,7 +460,7 @@ module RenderTestCases def test_render_knows_about_types_registered_when_extensions_are_checked_earlier_in_initialization ActionView::Template::Handlers.extensions ActionView::Template.register_template_handler :foo, CustomHandler - assert ActionView::Template::Handlers.extensions.include?(:foo) + assert_includes ActionView::Template::Handlers.extensions, :foo ensure ActionView::Template.unregister_template_handler :foo end diff --git a/actionview/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb index 597b2aa8dd..3f51636603 100644 --- a/actionview/test/template/test_case_test.rb +++ b/actionview/test/template/test_case_test.rb @@ -25,7 +25,7 @@ module ActionView def self.included(test_case) test_case.class_eval do test "helpers defined on ActionView::TestCase are available" do - assert test_case.ancestors.include?(ASharedTestHelper) + assert_includes test_case.ancestors, ASharedTestHelper assert_equal "Holla!", from_shared_helper end end @@ -64,7 +64,7 @@ module ActionView helper AnotherTestHelper test "additional helper classes can be specified as in a controller" do - assert test_case.ancestors.include?(AnotherTestHelper) + assert_includes test_case.ancestors, AnotherTestHelper assert_equal "Howdy!", from_another_helper end @@ -96,12 +96,12 @@ module ActionView tests ATestHelper test "tests the specified helper module" do assert_equal ATestHelper, test_case.helper_class - assert test_case.ancestors.include?(ATestHelper) + assert_includes test_case.ancestors, ATestHelper end helper AnotherTestHelper test "additional helper classes can be specified as in a controller" do - assert test_case.ancestors.include?(AnotherTestHelper) + assert_includes test_case.ancestors, AnotherTestHelper assert_equal "Howdy!", from_another_helper test_case.helper_class.module_eval do @@ -161,7 +161,7 @@ module ActionView test "view_assigns excludes internal ivars" do INTERNAL_IVARS.each do |ivar| assert defined?(ivar), "expected #{ivar} to be defined" - assert !view_assigns.keys.include?(ivar.to_s.tr("@", "").to_sym), "expected #{ivar} to be excluded from view_assigns" + assert_not_includes view_assigns.keys, ivar.to_s.tr("@", "").to_sym, "expected #{ivar} to be excluded from view_assigns" end end end @@ -200,7 +200,7 @@ module ActionView test "inflects the name of the helper module to test from the test case class" do assert_equal ATestHelper, test_case.helper_class - assert test_case.ancestors.include?(ATestHelper) + assert_includes test_case.ancestors, ATestHelper end test "a configured test controller is available" do @@ -209,7 +209,7 @@ module ActionView end test "no additional helpers should shared across test cases" do - assert !test_case.ancestors.include?(AnotherTestHelper) + assert_not_includes test_case.ancestors, AnotherTestHelper assert_raise(NoMethodError) { send :from_another_helper } end |