Skip to content

Commit

Permalink
Fix duplicate const warnings for ActiveRecord test
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jan 8, 2024
1 parent 544777d commit c68f5d4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/adapters/active_record_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def test_models_honor_table_name_prefixes_and_suffixes
ActiveRecord::Base.table_name_prefix = :foo_
ActiveRecord::Base.table_name_suffix = :_bar

Flipper::Adapters::ActiveRecord.send(:remove_const, :Feature)
Flipper::Adapters::ActiveRecord.send(:remove_const, :Gate)
Flipper::Adapters.send(:remove_const, :ActiveRecord)
load("flipper/adapters/active_record.rb")

assert_equal "foo_flipper_features_bar", Flipper::Adapters::ActiveRecord::Feature.table_name
Expand All @@ -58,8 +57,7 @@ def test_models_honor_table_name_prefixes_and_suffixes
ActiveRecord::Base.table_name_prefix = ""
ActiveRecord::Base.table_name_suffix = ""

Flipper::Adapters::ActiveRecord.send(:remove_const, :Feature)
Flipper::Adapters::ActiveRecord.send(:remove_const, :Gate)
Flipper::Adapters.send(:remove_const, :ActiveRecord)
load("flipper/adapters/active_record.rb")
end
end

0 comments on commit c68f5d4

Please sign in to comment.