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