Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Jul 20, 2024
1 parent e405cf3 commit ed566c5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions gemfiles/mongoid_6.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ if RUBY_VERSION >= "3.0"
gem "libev_scheduler"
gem "evt"
end
gem "fiber-storage"

gemspec path: "../"
1 change: 1 addition & 0 deletions gemfiles/mongoid_7.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ if RUBY_VERSION >= "3.0"
gem "libev_scheduler"
gem "evt"
end
gem "fiber-storage"

gemspec path: "../"
14 changes: 10 additions & 4 deletions spec/integration/rails/query_logs_spec.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# frozen_string_literals: true
require "spec_helper"

describe "Integration with ActiveRecord::QueryLogs" do
ActiveRecord::Schema.define do
create_table :things, force: true do |t|
t.string :name
t.integer :other_thing_id
def prepare_things_database
ActiveRecord::Schema.define do
create_table :things, force: true do |t|
t.string :name
t.integer :other_thing_id
end
end
end

prepare_things_database

class QueryLogSchema < GraphQL::Schema
class Thing < ActiveRecord::Base
belongs_to :other_thing, class_name: "Thing"
Expand Down Expand Up @@ -70,6 +75,7 @@ def other_thing(thing_id:)
use GraphQL::Dataloader
end
before do
prepare_things_database
@prev_tags = ActiveRecord::QueryLogs.tags
ActiveRecord.query_transformers << ActiveRecord::QueryLogs
ActiveRecord::QueryLogs.tags = [{
Expand Down

0 comments on commit ed566c5

Please sign in to comment.