Sha256: 0df854d7b4aba9b8b5385a84b9d469011fb9d069f84c95e4505d9da997bcba93

Contents?: true

Size: 1.23 KB

Versions: 3

Compression:

Stored size: 1.23 KB

Contents

# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require File.expand_path("../../test/dummy/config/environment.rb",  __FILE__)
require "rails/test_help"

require "simplecov"
SimpleCov.start if ENV["COVERAGE"]

require "minitest/autorun"

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

3 entries across 3 versions & 1 rubygems

Version Path
latexpdf-0.4.3 test/test_helper.rb
latexpdf-0.4.2 test/test_helper.rb
latexpdf-0.4.1 test/test_helper.rb