lib/dm-sqlserver-adapter/spec/setup.rb in dm-sqlserver-adapter-1.0.2 vs lib/dm-sqlserver-adapter/spec/setup.rb in dm-sqlserver-adapter-1.1.0.rc1
- old
+ new
@@ -5,10 +5,18 @@
module Spec
module Adapters
class SqlserverAdapter < Adapter
def connection_uri
- "#{super};instance=SQLEXPRESS"
+ if instance_name.size > 0
+ "#{super};instance=#{instance_name}"
+ else
+ super
+ end
+ end
+
+ def instance_name
+ ENV.fetch('DM_DB_SQLSERVER_INSTANCE', 'SQLEXPRESS')
end
end
use SqlserverAdapter