Sha256: 07c5b6f094797e7e101c10342830d2bf794d228fc31e1081439e389f1b9f738b

Contents?: true

Size: 430 Bytes

Versions: 65

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

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

65 entries across 65 versions & 3 rubygems

Version Path
sinclair-2.1.1 spec/support/fixture_helpers.rb
sinclair-2.1.0 spec/support/fixture_helpers.rb
sinclair-2.0.1 spec/support/fixture_helpers.rb
sinclair-2.0.0 spec/support/fixture_helpers.rb
sinclair-1.16.3 spec/support/fixture_helpers.rb
sinclair-1.16.2 spec/support/fixture_helpers.rb
sinclair-1.16.1 spec/support/fixture_helpers.rb
sinclair-1.16.0 spec/support/fixture_helpers.rb
sinclair-1.15.0 spec/support/fixture_helpers.rb
sinclair-1.14.2 spec/support/fixture_helpers.rb
sinclair-1.14.1 spec/support/fixture_helpers.rb
sinclair-1.14.0 spec/support/fixture_helpers.rb
sinclair-1.13.0 spec/support/fixture_helpers.rb
sinclair-1.12.1 spec/support/fixture_helpers.rb
sinclair-1.12.0 spec/support/fixture_helpers.rb
sinclair-1.11.0 spec/support/fixture_helpers.rb
sinclair-1.10.0 spec/support/fixture_helpers.rb
sinclair-1.9.0 spec/support/fixture_helpers.rb
sinclair-1.8.0 spec/support/fixture_helpers.rb
sinclair-1.7.0 spec/support/fixture_helpers.rb