Sha256: 20a6f81f72251c4decdd9132715759cc79c4cdab14ac96363cf2fcd1feec386d

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

def root_filepath
  @root_filepath ||= begin
                       current_directory = Dir.pwd

                       until Dir.exist?(current_directory + '/spec')
                         current_directory += '/..'
                       end

                       File.expand_path(current_directory)
                     end
end

def fixture_filepath(filepath)
  "#{root_filepath}/spec/fixtures/#{filepath}"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rspeckled-0.0.62 lib/rspeckled/helpers/filepaths.rb
rspeckled-0.0.61 lib/rspeckled/helpers/filepaths.rb
rspeckled-0.0.60 lib/rspeckled/helpers/filepaths.rb