Sha256: 7cd0a22085ddfe71f1ffe7ac4fad861761d785c5a73ce25eec05b8dee214c228

Contents?: true

Size: 466 Bytes

Versions: 3

Compression:

Stored size: 466 Bytes

Contents

require 'pathname'

module Fixtures
  def fixture_path(name)
    File.join '../fixtures', name
  end

  def absolute_fixture_path(name)
    File.expand_path fixture_path(name), File.dirname(__FILE__)
  end

  def fixture(name)
    File.read absolute_fixture_path(name)
  end

  def binary_fixture(name)
    File.open(absolute_fixture_path(name), "rb") { |f| f.read }
  end

  def fixtures_path
    Pathname(absolute_fixture_path '')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rs_232-2.0.7 spec/support/fixtures.rb
rs_232-2.0.5 spec/support/fixtures.rb
rs_232-2.0.4 spec/support/fixtures.rb