Sha256: 55e68baca72eb1f40944d031e595f748df87254e0117a349c80014073a2907f3
Contents?: true
Size: 1.26 KB
Versions: 8
Compression:
Stored size: 1.26 KB
Contents
# Configure Rails Environment ENV["RAILS_ENV"] = "test" require "simplecov" SimpleCov.start if ENV["COVERAGE"] require File.expand_path("../../test/dummy/config/environment.rb", __FILE__) require "rails/test_help" require "minitest/autorun" require 'mocha/mini_test' old_verbose, $VERBOSE = $VERBOSE, nil require "pdf-reader" $VERBOSE = old_verbose require "minitest/reporters" Minitest::Reporters.use! # Filter out Minitest backtrace while allowing backtrace from other libraries # to be shown. Minitest.backtrace_filter = Minitest::BacktraceFilter.new # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } # Load fixtures from the engine if ActiveSupport::TestCase.respond_to?(:fixture_path=) ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path ActiveSupport::TestCase.fixtures :all end class MockLogger def clear @messages = {} end def messages @messages ||= {} end def info(msg) msgs = (messages[:info] || Array.new) << msg @messages[:info] = msgs end def error(msg) end end def test_logger @logger ||= MockLogger.new end def data_path File.join(__dir__, "testdata") end
Version data entries
8 entries across 8 versions & 1 rubygems