spec/support/mongoid.rb in mongoid-compatibility-0.6.0 vs spec/support/mongoid.rb in mongoid-compatibility-1.0.0

- old
+ new

@@ -1,6 +1,6 @@ -ENV['MONGOID_ENV'] = 'test' +# frozen_string_literal: true if Mongoid::Compatibility::Version.mongoid2? Mongoid.load! 'spec/config/mongoid2.yml' elsif Mongoid::Compatibility::Version.mongoid3? Mongoid.load! 'spec/config/mongoid3.yml' @@ -12,11 +12,13 @@ Mongoid.load! 'spec/config/mongoid6.yml' elsif Mongoid::Compatibility::Version.mongoid7? Mongoid.load! 'spec/config/mongoid7.yml' elsif Mongoid::Compatibility::Version.mongoid8? Mongoid.load! 'spec/config/mongoid8.yml' +elsif Mongoid::Compatibility::Version.mongoid9? + Mongoid.load! 'spec/config/mongoid9.yml' else - fail "unsupported Mongoid version #{Mongoid::VERSION}" + raise "unsupported Mongoid version #{Mongoid::VERSION}" end RSpec.configure do |config| config.before do Mongoid.logger.level = Logger::INFO