Sha256: 24dd2a8ed772938e57329c8dda0ea5f5fe72a3eb775a6da69eccb076ad1f52e3
Contents?: true
Size: 1.06 KB
Versions: 9
Compression:
Stored size: 1.06 KB
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) ENV["RAILS_ENV"] ||= 'test' if ENV['COVER'] require 'simplecov' SimpleCov.root File.join(File.dirname(__FILE__), '..') SimpleCov.start end require 'rspec' require "webmock/rspec" require 'pry-byebug' require 'timecop' require 'active_record' require 'sqlite3' require "influxer" # Rails stub class Rails class << self def cache @cache ||= ActiveSupport::Cache::MemoryStore.new end def logger @logger ||= Logger.new(nil) end def env 'test' end end end require "influxer/rails/client" ActiveRecord::Base.send :include, Influxer::Model ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') Dir["#{File.dirname(__FILE__)}/support/metrics/*.rb"].each { |f| require f } Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.mock_with :rspec config.after(:each) { Influxer.reset! } config.after(:each) { Timecop.return } end
Version data entries
9 entries across 9 versions & 1 rubygems