spec/spec_helper.rb in rom-sql-1.0.0 vs spec/spec_helper.rb in rom-sql-1.0.1
- old
+ new
@@ -14,11 +14,12 @@
require 'logger'
require 'tempfile'
begin
require 'byebug'
-rescue LoadError # rubocop:disable Lint/HandleExceptions
+rescue LoadError
+ require 'pry'
end
LOGGER = Logger.new(File.open('./log/test.log', 'a'))
if defined? JRUBY_VERSION
@@ -38,13 +39,16 @@
ADAPTERS = DB_URIS.keys
PG_LTE_95 = ENV.fetch('PG_LTE_95', 'true') == 'true'
SPEC_ROOT = root = Pathname(__FILE__).dirname
-# Redirect inferrer warnings to a log file
-$stderr.reopen(SPEC_ROOT.join('../log/warnings.log'), 'w')
-
TMP_PATH = root.join('../tmp')
+
+class ROM::SQL::Schema::Inferrer
+ def self.on_error(*)
+ # quiet in specs
+ end
+end
Dir[root.join('shared/**/*')].each { |f| require f }
Dir[root.join('support/**/*')].each { |f| require f }
require 'dry/core/deprecations'