Sha256: af719be91d827fb0caa67516ae2c6aae72cca18a354a4877969862ae2ae93c5f

Contents?: true

Size: 772 Bytes

Versions: 6

Compression:

Stored size: 772 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
          gems.map(&:to_s).should == ["rails (3.2.13)", "mysql2 (0.3.12b6)"]
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_best_practices-1.14.4 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.14.3 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.14.2 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.14.1 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.14.0 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb
rails_best_practices-1.13.8 spec/rails_best_practices/prepares/gemfile_prepare_spec.rb