debian-mirror-gitlab/spec/support/helpers/rubygems_helpers.rb
2021-04-29 21:17:54 +05:30

11 lines
255 B
Ruby

# 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