database_cleaner/spec/support/sequel_helper.rb

13 lines
309 B
Ruby
Raw Normal View History

require 'sequel'
require 'database_cleaner/spec/database_helper'
class SequelHelper < DatabaseCleaner::Spec::DatabaseHelper
2018-05-22 09:02:13 -04:00
private
def establish_connection(config = default_config)
url = "#{db}:///"
url = "sqlite:///" if db == :sqlite3
@connection = ::Sequel.connect(url, config)
end
end