Sha256: 722ab016294b7322070c141da566ef18238aa460b33bf19a2a2350cb25708919

Contents?: true

Size: 404 Bytes

Versions: 27

Compression:

Stored size: 404 Bytes

Contents

require 'active_support'

module FixtureHelpers
  def load_fixture_file(filename)
      File.read (['./spec/', 'fixtures', filename].join('/'))
  end

  def load_json_fixture_file(filename)
    cached_json_fixture_file(filename)
  end

  private

  def cached_json_fixture_file(filename)
      ActiveSupport::JSON.decode(load_fixture_file(filename))
  end
end

RSpec.configuration.include FixtureHelpers

Version data entries

27 entries across 27 versions & 7 rubygems

Version Path
bidu-house-0.1.2 spec/support/fixture_helpers.rb
bidu-house-0.1.1 spec/support/fixture_helpers.rb
bidu-house-0.1.0 spec/support/fixture_helpers.rb
json_parser-1.1.0 spec/support/fixture_helpers.rb
concern_builder-0.0.1 spec/support/fixture_helpers.rb
json_parser-1.0.0 spec/support/fixture_helpers.rb
json_parser-0.1.0 spec/support/fixture_helpers.rb