Sha256: 74f3b1eeaa3abddee76323f6a5ccc350c4aa8a9966bb7fd8424606a5324844ac

Contents?: true

Size: 641 Bytes

Versions: 12

Compression:

Stored size: 641 Bytes

Contents

# Provides easy access to XML fixtures
module Fixtures
  # Gets the path to the fixtures
  # @return [String]
  # @api private
  def fixture_path
    File.join(File.dirname(__FILE__), "..", "fixtures")
  end
  # Loads a fixture
  # @param [Symbol] name the fixture to load
  # @param [Symbol] ext the exention of the fixture. defaults to :xml
  # @example Load ups_success_response.xml
  #   response = load_fixture :ups_success_response
  # @return [String] the contents of the file
  # @api private
  def load_fixture(name, ext = :xml)
    file_name = File.join(fixture_path, "#{name.to_s}.#{ext.to_s}")
    File.read(file_name)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trackerific-0.6.2 spec/support/fixtures.rb
trackerific-0.6.1 spec/support/fixtures.rb
trackerific-0.6.0 spec/support/fixtures.rb
trackerific-0.5.5 spec/support/fixtures.rb
trackerific-0.5.4 spec/support/fixtures.rb
trackerific-0.5.3 spec/support/fixtures.rb
trackerific-0.5.2 spec/support/fixtures.rb
trackerific-0.5.1 spec/support/fixtures.rb
trackerific-0.5.0 spec/support/fixtures.rb
trackerific-0.4.2 spec/support/fixtures.rb
trackerific-0.4.1 spec/support/fixtures.rb
trackerific-0.4.0 spec/support/fixtures.rb