Sha256: dea903b7a8dc750ed01cbac2384fabbfc218524cb3fd9216915a5486228fb174

Contents?: true

Size: 972 Bytes

Versions: 7

Compression:

Stored size: 972 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module RailsBestPractices
  module Prepares
    describe GemfilePrepare do
      let(:runner) { Core::Runner.new(prepares: described_class.new) }

      context 'gemfile' do
        it 'parses gems' do
          content = <<~EOF
            GEM
              remote: https://rubygems.org/
              specs:
                rails (3.2.13)
                  actionmailer (= 3.2.13)
                  actionpack (= 3.2.13)
                  activerecord (= 3.2.13)
                  activeresource (= 3.2.13)
                  activesupport (= 3.2.13)
                  bundler (~> 1.0)
                  railties (= 3.2.13)
                mysql2 (0.3.12b6)

            PLATFORMS
              ruby
          EOF
          runner.prepare('Gemfile.lock', content)
          gems = Prepares.gems
          expect(gems.map(&:to_s)).to eq(['rails (3.2.13)', 'mysql2 (0.3.12b6)'])
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rails_best_practices-1.23.2 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.23.1 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.23.0 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.22.1 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.22.0 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.21.0 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.20.1 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb