diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 60fa49a..197c806 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,6 +20,9 @@ jobs: gemfile: rails5-mongoid7 - ruby_version: '3.3' gemfile: rails-edge + exclude: + - ruby_version: 'jruby' + gemfile: rails7-mongoid8 # JRuby 9.4.8 with Mongoid 8 has trouble finding the Logger::INFO constant env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }} diff --git a/test/helper.rb b/test/helper.rb index f66c953..8d0831d 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -10,15 +10,10 @@ # Test setup MIGRATIONS_ROOT = 'test/migrations' -Mongoid.configure do |config| - config.load_configuration( - clients: { - default: { hosts: ['localhost:27017'], database: 'mongoid_test' }, - shard1: { hosts: ['localhost:27017'], database: 'mongoid_test_s1' } - }, - options: { log_level: 2 } # JRuby 9.4.8 with Mongoid 8 has trouble finding the constants otherwise - ) -end +Mongoid.load_configuration(clients: { + default: { hosts: ['localhost:27017'], database: 'mongoid_test' }, + shard1: { hosts: ['localhost:27017'], database: 'mongoid_test_s1' } +}) require_relative 'models/survey_schema' diff --git a/test/mongoid.yml b/test/mongoid.yml deleted file mode 100644 index f638751..0000000 --- a/test/mongoid.yml +++ /dev/null @@ -1,10 +0,0 @@ -test: - clients: - default: - database: mongoid_test - hosts: - - localhost:27017 - shard1: - database: mongoid_test_s1 - hosts: - - localhost:27017