Sha256: c4f7ebedb975e46cc9452427c205a65bb1f32c5aee44739186d624e6eab4f58b

Contents?: true

Size: 993 Bytes

Versions: 1

Compression:

Stored size: 993 Bytes

Contents

# Configure Rails Environment
ENV['RAILS_ENV'] = 'test'

require 'combustion'
require 'byebug'

Combustion.path = 'test/dummy'
Combustion.initialize!(:all) do
  if config.active_record.sqlite3.respond_to?(:represent_boolean_as_integer) # Rails 5.2
    config.active_record.sqlite3.represent_boolean_as_integer = true
  end
end

require 'rails/test_help'
require 'mocha'
require 'mocha/mini_test'

require 'wicked_pdf'

WickedPdf.config = { :exe_path => ENV['WKHTMLTOPDF_BIN'] || '/usr/local/bin/wkhtmltopdf' }

Rails.backtrace_cleaner.remove_silencers!

if (assets_dir = Rails.root.join('app/assets')) && File.directory?(assets_dir)
  # Copy CSS file
  destination = assets_dir.join('stylesheets/wicked.css')
  source = File.read('test/fixtures/wicked.css')
  File.open(destination, 'w') { |f| f.write(source) }

  # Copy JS file
  destination = assets_dir.join('javascripts/wicked.js')
  source = File.read('test/fixtures/wicked.js')
  File.open(destination, 'w') { |f| f.write(source) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adzap-wicked_pdf-2.0.0.beta2 test/test_helper.rb