Sha256: 0e30d52d1bb6a05010daee437e5952b4f59118fa2b8a8940e065ebfa74af95ee

Contents?: true

Size: 391 Bytes

Versions: 3

Compression:

Stored size: 391 Bytes

Contents

require 'pathname'

module FileFixtureHelper
  FIXTURES_PATH = Pathname.new(File.expand_path("../fixtures", __dir__)).freeze
  FILE_FIXTURES_PATH = FIXTURES_PATH.join("files").freeze

  def file_fixture(relative_path)
    pathname = FILE_FIXTURES_PATH.join(relative_path)

    raise ArgumentError, "File '#{pathname}' not found" unless pathname.file?

    pathname
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prawn-table-continued-1.0.0.rc3 spec/extensions/file_fixture_helper.rb
prawn-table-continued-1.0.0.rc2 spec/extensions/file_fixture_helper.rb
prawn-table-continued-1.0.0.rc1 spec/extensions/file_fixture_helper.rb