diff options
author | Rafael Mendonça França <rafael@franca.dev> | 2019-08-02 00:24:21 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafael@franca.dev> | 2019-08-02 00:24:21 -0400 |
commit | 967beb7229e29c7d09fc3a5bc8205d2a6119e1c5 (patch) | |
tree | 48fd29296e0c353ca856e72ce084387b6512ff7e | |
parent | 6384933994a494a1ea44cb51609534c1ccf639e4 (diff) | |
download | rails-967beb7229e29c7d09fc3a5bc8205d2a6119e1c5.tar.gz rails-967beb7229e29c7d09fc3a5bc8205d2a6119e1c5.tar.bz2 rails-967beb7229e29c7d09fc3a5bc8205d2a6119e1c5.zip |
Revert "MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now"
This reverts commit 98d0f7ebd34b858f12a12dcf37ae54fdbb5cab64.
-rw-r--r-- | actioncable/test/test_helper.rb | 3 | ||||
-rw-r--r-- | actionmailer/test/abstract_unit.rb | 3 | ||||
-rw-r--r-- | actionpack/test/abstract_unit.rb | 4 | ||||
-rw-r--r-- | actionview/test/abstract_unit.rb | 3 | ||||
-rw-r--r-- | activemodel/test/cases/helper.rb | 3 | ||||
-rw-r--r-- | activerecord/test/cases/test_case.rb | 2 | ||||
-rw-r--r-- | activestorage/test/models/blob_test.rb | 3 | ||||
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 3 | ||||
-rw-r--r-- | activesupport/test/abstract_unit.rb | 3 | ||||
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 2 | ||||
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 2 |
11 files changed, 28 insertions, 3 deletions
diff --git a/actioncable/test/test_helper.rb b/actioncable/test/test_helper.rb index b4408b3d6f..033f034b0c 100644 --- a/actioncable/test/test_helper.rb +++ b/actioncable/test/test_helper.rb @@ -2,6 +2,7 @@ require "action_cable" require "active_support/testing/autorun" +require "active_support/testing/method_call_assertions" require "puma" require "rack/mock" @@ -19,6 +20,8 @@ ActionCable.server.config.cable = { "adapter" => "test" } ActionCable.server.config.logger = Logger.new(nil) class ActionCable::TestCase < ActiveSupport::TestCase + include ActiveSupport::Testing::MethodCallAssertions + def wait_for_async wait_for_executor Concurrent.global_io_executor end diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 0e31a81c8c..a2a603834c 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -16,6 +16,7 @@ module Rails end require "active_support/testing/autorun" +require "active_support/testing/method_call_assertions" require "action_mailer" require "action_mailer/test_case" @@ -35,6 +36,8 @@ ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH ActionMailer::Base.delivery_job = ActionMailer::MailDeliveryJob class ActiveSupport::TestCase + include ActiveSupport::Testing::MethodCallAssertions + private # Skips the current run on Rubinius using Minitest::Assertions#skip def rubinius_skip(message = "") diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index ded93dd33f..1decfcee95 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -350,7 +350,11 @@ class CommentsController < ResourcesController; end class AccountsController < ResourcesController; end class ImagesController < ResourcesController; end +require "active_support/testing/method_call_assertions" + class ActiveSupport::TestCase + include ActiveSupport::Testing::MethodCallAssertions + private # Skips the current run on Rubinius using Minitest::Assertions#skip def rubinius_skip(message = "") diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb index 516631ddb2..b652f2e6cb 100644 --- a/actionview/test/abstract_unit.rb +++ b/actionview/test/abstract_unit.rb @@ -16,6 +16,7 @@ silence_warnings do end require "active_support/testing/autorun" +require "active_support/testing/method_call_assertions" require "action_controller" require "action_view" require "action_view/testing/resolvers" @@ -193,6 +194,8 @@ end class ActiveSupport::TestCase parallelize + include ActiveSupport::Testing::MethodCallAssertions + private # Skips the current run on Rubinius using Minitest::Assertions#skip def rubinius_skip(message = "") diff --git a/activemodel/test/cases/helper.rb b/activemodel/test/cases/helper.rb index 483a108bda..c6335ac9e3 100644 --- a/activemodel/test/cases/helper.rb +++ b/activemodel/test/cases/helper.rb @@ -9,9 +9,12 @@ ActiveSupport::Deprecation.debug = true I18n.enforce_available_locales = false require "active_support/testing/autorun" +require "active_support/testing/method_call_assertions" require "active_support/core_ext/integer/time" class ActiveModel::TestCase < ActiveSupport::TestCase + include ActiveSupport::Testing::MethodCallAssertions + private # Skips the current run on Rubinius using Minitest::Assertions#skip def rubinius_skip(message = "") diff --git a/activerecord/test/cases/test_case.rb b/activerecord/test/cases/test_case.rb index be74acf3d4..1b8bad32a4 100644 --- a/activerecord/test/cases/test_case.rb +++ b/activerecord/test/cases/test_case.rb @@ -2,6 +2,7 @@ require "active_support" require "active_support/testing/autorun" +require "active_support/testing/method_call_assertions" require "active_support/testing/stream" require "active_record/fixtures" @@ -12,6 +13,7 @@ module ActiveRecord # # Defines some test assertions to test against SQL queries. class TestCase < ActiveSupport::TestCase #:nodoc: + include ActiveSupport::Testing::MethodCallAssertions include ActiveSupport::Testing::Stream include ActiveRecord::TestFixtures include ActiveRecord::ValidationsRepairHelper diff --git a/activestorage/test/models/blob_test.rb b/activestorage/test/models/blob_test.rb index 57c6333401..9fd75a1b4a 100644 --- a/activestorage/test/models/blob_test.rb +++ b/activestorage/test/models/blob_test.rb @@ -2,8 +2,11 @@ require "test_helper" require "database/setup" +require "active_support/testing/method_call_assertions" class ActiveStorage::BlobTest < ActiveSupport::TestCase + include ActiveSupport::Testing::MethodCallAssertions + test "unattached scope" do [ create_blob(filename: "funky.jpg"), create_blob(filename: "town.jpg") ].tap do |blobs| User.create! name: "DHH", avatar: blobs.first diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index 0b1cefc5e1..7be4108ed7 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -5,7 +5,6 @@ require "minitest" require "active_support/testing/tagged_logging" require "active_support/testing/setup_and_teardown" require "active_support/testing/assertions" -require "active_support/testing/method_call_assertions" require "active_support/testing/deprecation" require "active_support/testing/declarative" require "active_support/testing/isolation" @@ -138,13 +137,11 @@ module ActiveSupport include ActiveSupport::Testing::TaggedLogging prepend ActiveSupport::Testing::SetupAndTeardown include ActiveSupport::Testing::Assertions - include ActiveSupport::Testing::MethodCallAssertions include ActiveSupport::Testing::Deprecation include ActiveSupport::Testing::TimeHelpers include ActiveSupport::Testing::FileFixtures extend ActiveSupport::Testing::Declarative - # test/unit backwards compatibility methods alias :assert_raise :assert_raises alias :assert_not_empty :refute_empty diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index b46ad6842f..01e60abd99 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -10,6 +10,7 @@ silence_warnings do end require "active_support/testing/autorun" +require "active_support/testing/method_call_assertions" ENV["NO_RELOAD"] = "1" require "active_support" @@ -26,6 +27,8 @@ ActiveSupport.to_time_preserves_timezone = ENV["PRESERVE_TIMEZONES"] == "1" I18n.enforce_available_locales = false class ActiveSupport::TestCase + include ActiveSupport::Testing::MethodCallAssertions + private # Skips the current run on Rubinius using Minitest::Assertions#skip def rubinius_skip(message = "") diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index c68ba46a9a..8b42cb83db 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -3,6 +3,7 @@ require "abstract_unit" require "active_support/core_ext/module/remove_method" require "active_support/testing/stream" +require "active_support/testing/method_call_assertions" require "rails/generators" require "rails/generators/test_case" @@ -27,6 +28,7 @@ require "action_view" module GeneratorsTestHelper include ActiveSupport::Testing::Stream + include ActiveSupport::Testing::MethodCallAssertions GemfileEntry = Struct.new(:name, :version, :comment, :options, :commented_out) do def initialize(name, version, comment, options = {}, commented_out = false) diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 40731d5f07..6077ba3ee7 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -14,6 +14,7 @@ require "bundler/setup" unless defined?(Bundler) require "active_support" require "active_support/testing/autorun" require "active_support/testing/stream" +require "active_support/testing/method_call_assertions" require "active_support/test_case" require "minitest/retry" @@ -494,6 +495,7 @@ class ActiveSupport::TestCase include TestHelpers::Generation include TestHelpers::Reload include ActiveSupport::Testing::Stream + include ActiveSupport::Testing::MethodCallAssertions end # Create a scope and build a fixture rails app |