Sha256: 12a075640c9756f6a0d285471538e6e4c015155072fdf6d64b289628f770f108

Contents?: true

Size: 861 Bytes

Versions: 2

Compression:

Stored size: 861 Bytes

Contents

require 'bundler'
Bundler.require(:default, :development)

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

module Support
  def flatten_calls(calls)
    [].tap do |flattened_calls|
      add = -> (local_calls) do
        local_calls.each do |call|
          flattened_calls << call[0..2]
          add.call call[3]
        end
      end

      add.call element.base_calls
    end
  end

  def fake_state
    state = Prawn::SVG::State.new
    state.viewport_sizing = document.sizing if defined?(document)
    state
  end
end

RSpec.configure do |config|
  config.mock_with :rspec do |c|
    c.syntax = [:should, :expect]
  end

  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end

  config.include Support
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prawn-svg-0.33.0 spec/spec_helper.rb
prawn-svg-0.32.0 spec/spec_helper.rb