Sha256: a1b3378e8bee00ecd9d7b9a771c208fb59e7e5b6407e6dbbd3a8adc337e24b3c

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

require "pathname"

Fixtures = Hash.new do |hash, fixture|
  if path = Fixtures.xml?(fixture)
    hash[fixture] = path.read
  elsif path = Fixtures.file?(fixture)
    hash[fixture] = path
  end
end

def Fixtures.root
  Pathname("../../fixtures").expand_path(__FILE__)
end

def Fixtures.file?(fixture)
  path = root.join(fixture)
  path.file? && path
end

def Fixtures.xml?(fixture)
  file?("#{fixture}.xml")
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
azure-0.1.1 test/support/fixtures.rb
azure-0.1.0 test/support/fixtures.rb