Sha256: 466757df7f53a4828edf26ca1a7fdd56c13bc6002482b74f3d147e349fb3b77e

Contents?: true

Size: 436 Bytes

Versions: 13

Compression:

Stored size: 436 Bytes

Contents

# frozen_string_literal: true

module FixtureHelper
  def file_fixture(fixture_name)
    file_fixture_path = ::Rails.root.join('..', 'fixtures')
    path = Pathname.new(File.join(file_fixture_path, fixture_name))
    raise ArgumentError, "the directory '#{file_fixture_path}' does not contain a file named '#{fixture_name}'" \
      unless path.exist?

    path
  end
end

RSpec.configure do |config|
  config.include FixtureHelper
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
lcms-engine-0.5.5 spec/support/fixture_helper.rb
lcms-engine-0.5.4 spec/support/fixture_helper.rb
lcms-engine-0.5.3 spec/support/fixture_helper.rb
lcms-engine-0.5.2 spec/support/fixture_helper.rb
lcms-engine-0.5.1 spec/support/fixture_helper.rb
lcms-engine-0.5.0 spec/support/fixture_helper.rb
lcms-engine-0.4.2 spec/support/fixture_helper.rb
lcms-engine-0.4.1 spec/support/fixture_helper.rb
lcms-engine-0.4.0 spec/support/fixture_helper.rb
lcms-engine-0.3.1 spec/support/fixture_helper.rb
lcms-engine-0.1.4 spec/support/fixture_helper.rb
lcms-engine-0.3.0 spec/support/fixture_helper.rb
lcms-engine-0.1.3 spec/support/fixture_helper.rb