Sha256: f4a324ea583f9bf1acd9668b66acdb5f83718176779cbcf163c1b226f4bd9172

Contents?: true

Size: 601 Bytes

Versions: 17

Compression:

Stored size: 601 Bytes

Contents

require 'spec_helper'

module RailsBestPractices::Core
  describe Gems do
    it { should be_a_kind_of Array }

    let(:gems) { Gems.new }
    before do
      gems << Gem.new("rails", "4.0.0")
      gems << Gem.new("mysql2", "0.2.0")
    end

    context "#has_gem?" do
      it "has rails gem" do
        expect(gems).to be_has_gem "rails"
      end

      it "hasn't sinatra gem" do
        expect(gems).not_to be_has_gem "sinatra"
      end
    end

    context "#gem_version" do
      it "gets rails version" do
        expect(gems.gem_version("rails")).to eq "4.0.0"
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rails_best_practices-1.19.0 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.18.1 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.18.0 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.17.0 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.16.0 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.15.7 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.15.6 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.15.4 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.15.3 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.15.2 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.15.1 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.14.4 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.14.3 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.14.2 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.14.1 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.14.0 spec/rails_best_practices/core/gems_spec.rb
rails_best_practices-1.13.8 spec/rails_best_practices/core/gems_spec.rb