spec/lite_spec_helper.rb in mongoid-7.1.11 vs spec/lite_spec_helper.rb in mongoid-7.2.0.rc1
- old
+ new
@@ -1,11 +1,10 @@
# frozen_string_literal: true
# encoding: utf-8
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "shared", "lib"))
# Load byebug before mongoid, to place breakpoints in the lib methods.
# But SpecConfig needs the driver code - require the driver here.
require "mongo"
@@ -14,12 +13,12 @@
# that verify method forwarding. Work around by proactively loading 'pp'.
# https://github.com/jruby/jruby/issues/5599
require 'pp'
require 'support/spec_config'
-require 'mrss/lite_constraints'
-require "support/session_registry"
+require 'support/lite_constraints'
+require "support/session_registry"
unless SpecConfig.instance.ci?
begin
require 'byebug'
rescue LoadError
@@ -49,14 +48,15 @@
if SpecConfig.instance.ci?
config.add_formatter(RSpec::Core::Formatters::JsonFormatter, File.join(File.dirname(__FILE__), '../tmp/rspec.json'))
end
- if SpecConfig.instance.ci? && !%w(1 true yes).include?(ENV['INTERACTIVE']&.downcase)
+ if SpecConfig.instance.ci?
timeout = if SpecConfig.instance.app_tests?
- # App tests under JRuby take a REALLY long time (over 5 minutes per test).
- 500
+ # Allow 5 minutes per test for the app tests, since they install
+ # gems for Rails applications which can take a long time.
+ 300
else
# Allow a max of 30 seconds per test.
# Tests should take under 10 seconds ideally but it seems
# we have some that run for more than 10 seconds in CI.
30
@@ -66,10 +66,10 @@
example.run
end
end
end
- config.extend(Mrss::LiteConstraints)
+ config.extend(LiteConstraints)
end
# require all shared examples
Dir['./spec/support/shared/*.rb'].sort.each { |file| require file }