Files
danbooru/test/test_helper.rb
2017-02-06 18:48:36 -06:00

39 lines
821 B
Ruby

ENV["RAILS_ENV"] = "test"
if ENV["SIMPLECOV"]
require 'simplecov'
SimpleCov.start 'rails' do
add_group "Libraries", ["app/logical", "lib"]
add_group "Presenters", "app/presenters"
end
end
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'cache'
Dir[File.expand_path(File.dirname(__FILE__) + "/factories/*.rb")].each {|file| require file}
Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.library :rails
end
end
if defined?(MEMCACHE)
Object.send(:remove_const, :MEMCACHE)
end
MEMCACHE = MemcacheMock.new
Delayed::Worker.delay_jobs = false
require "helpers/reportbooru_helper"
class ActiveSupport::TestCase
include ReportbooruHelper
setup do
mock_popular_search_service!
mock_missed_search_service!
end
end