Sha256: 1dd9d7973e2dcfac007b586f561206817bbe8abd83dab1480d1b2617231cf8e0
Contents?: true
Size: 1.29 KB
Versions: 4
Compression:
Stored size: 1.29 KB
Contents
# Copyright (c) 2011 - 2013, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias # Schmidt if ENV['COV'] require 'simplecov' SimpleCov.start end require 'minitest/autorun' require 'minitest/spec' require 'minitest/mock' require 'mocha/minitest' require 'after_do' require 'byebug' require 'pathname' require 'lhm' $project = Pathname.new(File.dirname(__FILE__) + '/..').cleanpath $spec = $project.join('spec') $fixtures = $spec.join('fixtures') $db_name = 'test' require 'active_record' require 'mysql2' logger = Logger.new STDOUT logger.level = Logger::WARN Lhm.logger = logger def without_verbose(&block) old_verbose, $VERBOSE = $VERBOSE, nil yield ensure $VERBOSE = old_verbose end def printer printer = Lhm::Printer::Base.new def printer.notify(*) ;end def printer.end(*) [] ;end printer end def throttler Lhm::Throttler::Time.new(:stride => 100) end def init_test_db db_config = YAML.load_file(File.expand_path(File.dirname(__FILE__)) + '/integration/database.yml') conn = Mysql2::Client.new( :host => '127.0.0.1', :username => db_config['master']['user'], :password => db_config['master']['password'], :port => db_config['master']['port'] ) conn.query("DROP DATABASE IF EXISTS #{$db_name}") conn.query("CREATE DATABASE #{$db_name}") end init_test_db
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lhm-shopify-3.5.4 | spec/test_helper.rb |
lhm-shopify-3.5.3 | spec/test_helper.rb |
lhm-shopify-3.5.2 | spec/test_helper.rb |
lhm-shopify-3.5.1 | spec/test_helper.rb |