spec/spec_helper.rb in rom-sql-0.5.3 vs spec/spec_helper.rb in rom-sql-0.6.0.beta1
- old
+ new
@@ -19,10 +19,12 @@
begin
require 'byebug'
rescue LoadError
end
+ROM.use :auto_registration
+
LOGGER = Logger.new(File.open('./log/test.log', 'a'))
DB_URI = 'postgres://localhost/rom'
root = Pathname(__FILE__).dirname
TMP_PATH = root.join('../tmp')
@@ -41,8 +43,8 @@
end
config.after do
added_constants = Object.constants - @constants
added_constants.each { |name| Object.send(:remove_const, name) }
- ROM.instance_variable_set('@gateways', {})
+ ROM.instance_variable_get('@environment').instance_variable_set('@gateways', {})
end
end