Skip to content

Commit

Permalink
Deletes classic test related to STI
Browse files Browse the repository at this point in the history
Without classic, this test would be testing that Zeitwerk works. That
belongs to the test suite of Zeitwerk.

Active Record has the class available, whether it was already loaded or
pending autoloading, is not AR's concern.
  • Loading branch information
fxn committed Aug 9, 2021
1 parent cd22ecb commit fc7c029
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions activerecord/test/cases/inheritance_test.rb
Expand Up @@ -376,17 +376,6 @@ def test_new_without_storing_full_sti_class
end
end

def test_new_with_autoload_paths
path = File.expand_path("../models/autoloadable", __dir__)
ActiveSupport::Dependencies.autoload_paths << path

firm = Company.new(type: "ExtraFirm")
assert_equal ExtraFirm, firm.class
ensure
ActiveSupport::Dependencies.autoload_paths.reject! { |p| p == path }
ActiveSupport::Dependencies.clear
end

def test_inheritance_condition
assert_equal 12, Company.count
assert_equal 3, Firm.count
Expand Down

0 comments on commit fc7c029

Please sign in to comment.