spec/spec_helper.rb in rom-sql-0.6.1 vs spec/spec_helper.rb in rom-sql-0.7.0.beta1
- old
+ new
@@ -2,11 +2,11 @@
require 'bundler'
Bundler.setup
if RUBY_ENGINE == 'rbx'
- require "codeclimate-test-reporter"
+ require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start
end
require 'rom-sql'
require 'rom/sql/rake_task'
@@ -16,17 +16,15 @@
require 'active_support/inflector'
require 'logger'
begin
require 'byebug'
-rescue LoadError
+rescue LoadError # rubocop:disable Lint/HandleExceptions
end
-ROM.use :auto_registration
-
LOGGER = Logger.new(File.open('./log/test.log', 'a'))
-DB_URI = 'postgres://localhost/rom'
+DB_URI = 'postgres://localhost/rom_sql'
root = Pathname(__FILE__).dirname
TMP_PATH = root.join('../tmp')
Dir[root.join('shared/*.rb').to_s].each { |f| require f }
@@ -43,8 +41,7 @@
end
config.after do
added_constants = Object.constants - @constants
added_constants.each { |name| Object.send(:remove_const, name) }
- ROM.instance_variable_get('@environment').instance_variable_set('@gateways', {})
end
end