Skip to content

Commit

Permalink
refactor test trilogy file to extract ENV reference and simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zmariscal committed Feb 3, 2024
1 parent 7a27831 commit 24ceeae
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/adapters/trilogy.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# frozen_string_literal: true

# ensure we connect to the trilogy adapter
if ENV['AR_VERSION'].to_f >= 7.1
ENV["ARE_DB"] = "trilogy"
else
ENV["ARE_DB"] = "trilogy"

if ENV['AR_VERSION'].to_f <= 7.0
require "activerecord-trilogy-adapter"
require "trilogy_adapter/connection"
ActiveRecord::Base.extend TrilogyAdapter::Connection
ENV["ARE_DB"] = "trilogy"
end

0 comments on commit 24ceeae

Please sign in to comment.