Skip to content

Commit

Permalink
fix AR tests for Rails 8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skaes committed Nov 17, 2024
1 parent 111867d commit aa0a510
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ appraisals = [

if RUBY_VERSION >= "3.1"
appraisals << "7.2.2"
appraisals << "8.0.0"
end

appraisals.each do |rails_version|
Expand Down
4 changes: 2 additions & 2 deletions test/unit/database_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def teardown
ActiveRecord::Base.connection.execute "SELECT 1"
bandit.consumed
assert(bandit.current_runtime > 0)
if ActiveRecord::VERSION::STRING =~ /\A7.2\..*\Z/
if ActiveRecord::VERSION::STRING >= Gem::Version.new("7.2.0")
# registry ingores schema calls now
assert_equal 1, bandit.calls
else
Expand All @@ -86,7 +86,7 @@ def teardown
ActiveRecord::Base.connection.execute "SELECT 1"
bandit.consumed
assert(bandit.current_runtime > 0)
if ActiveRecord::VERSION::STRING =~ /\A7.2\..*\Z/
if ActiveRecord::VERSION::STRING >= Gem::Version.new("7.2.0")
# registry ingores schema calls now
assert_equal 1, bandit.calls
else
Expand Down

0 comments on commit aa0a510

Please sign in to comment.