Sha256: 81b4238f08354a8c040829b4f357e52144fc775adce5db74efc0048b3f32b41e

Contents?: true

Size: 858 Bytes

Versions: 13

Compression:

Stored size: 858 Bytes

Contents

require "spec_helper"
require "appraisal/dependency_list"

describe Appraisal::DependencyList do
  describe "#add" do
    let(:dependency_list) { Appraisal::DependencyList.new }

    it "adds dependency to the list" do
      dependency_list.add("rails", ["4.1.4"])

      expect(dependency_list.to_s).to eq %(gem "rails", "4.1.4")
    end

    it "retains the order of dependencies" do
      dependency_list.add("rails", ["4.1.4"])
      dependency_list.add("bundler", ["1.7.2"])

      expect(dependency_list.to_s).to eq <<-GEMS.strip_heredoc.strip
        gem "rails", "4.1.4"
        gem "bundler", "1.7.2"
      GEMS
    end

    it "overrides dependency with the same name" do
      dependency_list.add("rails", ["4.1.0"])
      dependency_list.add("rails", ["4.1.4"])

      expect(dependency_list.to_s).to eq %(gem "rails", "4.1.4")
    end
  end
end

Version data entries

13 entries across 11 versions & 3 rubygems

Version Path
appraisal-2.3.0 spec/appraisal/dependency_list_spec.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/appraisal-2.2.0/spec/appraisal/dependency_list_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/appraisal-2.2.0/spec/appraisal/dependency_list_spec.rb
appraisal-2.2.0 spec/appraisal/dependency_list_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/appraisal-1.0.2/spec/appraisal/dependency_list_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/appraisal-1.0.2/spec/appraisal/dependency_list_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/appraisal-1.0.2/spec/appraisal/dependency_list_spec.rb
appraisal-2.1.0 spec/appraisal/dependency_list_spec.rb
appraisal-2.0.2 spec/appraisal/dependency_list_spec.rb
appraisal-2.0.1 spec/appraisal/dependency_list_spec.rb
appraisal-2.0.0 spec/appraisal/dependency_list_spec.rb
appraisal-1.0.3 spec/appraisal/dependency_list_spec.rb
appraisal-1.0.2 spec/appraisal/dependency_list_spec.rb