ActiveRecord::AuxTable -> HasAuxTable

This commit is contained in:
Dylan Knutson
2025-07-14 17:32:58 +00:00
parent 81ec3d2902
commit 9f73c0d364
15 changed files with 510 additions and 528 deletions

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
RSpec.describe ActiveRecord::AuxTable do
RSpec.describe HasAuxTable do
LOG_QUERIES = false
# Helper method to count queries
@@ -44,7 +44,7 @@ RSpec.describe ActiveRecord::AuxTable do
end
class Vehicle < ActiveRecord::Base
include ActiveRecord::AuxTable
include HasAuxTable
end
class Car < Vehicle
@@ -59,7 +59,7 @@ RSpec.describe ActiveRecord::AuxTable do
# Car class will be defined after schema setup
it "has a version number" do
expect(ActiveRecord::AuxTable::VERSION).not_to be nil
expect(HasAuxTable::VERSION).not_to be nil
end
it "can create STI records" do
@@ -519,7 +519,7 @@ RSpec.describe ActiveRecord::AuxTable do
# Define models that will trigger the validation
class TestOverlapMain < ActiveRecord::Base
include ActiveRecord::AuxTable
include HasAuxTable
end
expect {
@@ -547,7 +547,7 @@ RSpec.describe ActiveRecord::AuxTable do
end
class TestSystemColsMain < ActiveRecord::Base
include ActiveRecord::AuxTable
include HasAuxTable
end
expect {

View File

@@ -1,8 +1,8 @@
# frozen_string_literal: true
require "active_record"
require "active_record/aux_table"
require "active_record/errors"
require "has_aux_table"
require "pry"
# Configure ActiveRecord to use in-memory SQLite database