summaryrefslogtreecommitdiff
path: root/spec/support/helpers/rubygems_helpers.rb
blob: 6a808f52e979f4593c3606547ceb768cf909eb41 (plain)
1
2
3
4
5
6
7
8
9
10
11
# 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