gitlab-org--gitlab-foss/spec/support/helpers/rubygems_helpers.rb

12 lines
255 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module RubygemsHelpers
def gem_from_file(file)
full_path = File.expand_path(
Rails.root.join('spec', 'fixtures', 'packages', 'rubygems', file.filename)
)
Gem::Package.new(File.open(full_path))
end
end