Sha256: 9ac6debfe8f8f3f4e4aeb1d0497896d2f0c46756095358123b85f135b3506be5

Contents?: true

Size: 777 Bytes

Versions: 1

Compression:

Stored size: 777 Bytes

Contents

require 'spec_helper'

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

      context 'gemfile' do
        it 'should parse 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

1 entries across 1 versions & 1 rubygems

Version Path
rails_best_practices-1.19.1 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb