Sha256: 8b42b364dcb7247ff93a18fd2a6cc7b9a6f2b0afc1f94adee120a45c105621f1

Contents?: true

Size: 818 Bytes

Versions: 3

Compression:

Stored size: 818 Bytes

Contents

# frozen_string_literal: true

SPEC_ROOT = File.dirname(__FILE__)
$LOAD_PATH.unshift(SPEC_ROOT)
$LOAD_PATH.unshift(File.join(SPEC_ROOT, '..', 'lib'))
require 'simplecov'
SimpleCov.start do
  add_filter 'spec/'
end

Warning[:deprecated] = true if defined?(Warning.[]=)

require 'pdfkit'
require 'rspec'
require 'mocha'
require 'rack'
require 'rack/test'
require 'active_support'
require 'custom_wkhtmltopdf_path' if File.exist?(File.join(SPEC_ROOT, 'custom_wkhtmltopdf_path.rb'))

RSpec.configure do |config|
  include Rack::Test::Methods
end

RSpec::Matchers.define :contain do |expected|
  match do |actual|
    (0..(actual.length - expected.length)).any? do |base_index|
      expected.each_with_index.all? do |expected_element,index|
        actual[base_index+index] == expected_element
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
my_pdfkit-0.1.0.0 spec/spec_helper.rb
pdfkit-0.8.7.3 spec/spec_helper.rb
pdfkit-0.8.7.2 spec/spec_helper.rb