diff options
Diffstat (limited to 'spec/lock/lockfile_spec.rb')
-rw-r--r-- | spec/lock/lockfile_spec.rb | 80 |
1 files changed, 60 insertions, 20 deletions
diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb index 74a1f82581..c72dbc577d 100644 --- a/spec/lock/lockfile_spec.rb +++ b/spec/lock/lockfile_spec.rb @@ -544,14 +544,14 @@ describe "the lockfile format" do G lockfile_should_be <<-G + GEM + specs: + PATH remote: #{lib_path("foo-1.0")} specs: foo (1.0) - GEM - specs: - PLATFORMS #{generic(Gem::Platform.local)} @@ -582,16 +582,16 @@ describe "the lockfile format" do specs: bar (1.0) - PATH - remote: #{lib_path("foo-1.0")} - specs: - foo (1.0) - GEM remote: file:#{gem_repo1}/ specs: rack (1.0.0) + PATH + remote: #{lib_path("foo-1.0")} + specs: + foo (1.0) + PLATFORMS #{generic(Gem::Platform.local)} @@ -766,14 +766,14 @@ describe "the lockfile format" do G lockfile_should_be <<-G + GEM + specs: + PATH remote: foo specs: foo (1.0) - GEM - specs: - PLATFORMS #{generic(Gem::Platform.local)} @@ -794,14 +794,14 @@ describe "the lockfile format" do G lockfile_should_be <<-G + GEM + specs: + PATH remote: ../foo specs: foo (1.0) - GEM - specs: - PLATFORMS #{generic(Gem::Platform.local)} @@ -822,14 +822,14 @@ describe "the lockfile format" do G lockfile_should_be <<-G + GEM + specs: + PATH remote: foo specs: foo (1.0) - GEM - specs: - PLATFORMS #{generic(Gem::Platform.local)} @@ -849,14 +849,14 @@ describe "the lockfile format" do G lockfile_should_be <<-G + GEM + specs: + PATH remote: ../foo specs: foo (1.0) - GEM - specs: - PLATFORMS #{generic(Gem::Platform.local)} @@ -1264,4 +1264,44 @@ describe "the lockfile format" do expect(err).to match(/your Gemfile.lock contains merge conflicts/i) expect(err).to match(/git checkout HEAD -- Gemfile.lock/i) end + + it "stores each rubygems source in its own source section" do + build_repo gem_repo3 do + build_gem "cocoapods", "0.37.0" + end + + install_gemfile <<-G + source "file://#{gem_repo3}" + source "file://#{gem_repo1}" do + gem "thin" # comes first to test name sorting + gem "rack" + end + gem "cocoapods" # shoud come from repo3! + G + + lockfile_should_be <<-L + GEM + remote: file:/Users/segiddins/Development/OpenSource/bundler/tmp/gems/remote1/ + specs: + rack (1.0.0) + thin (1.0) + rack + + GEM + remote: file:/Users/segiddins/Development/OpenSource/bundler/tmp/gems/remote3/ + specs: + cocoapods (0.37.0) + + PLATFORMS + ruby + + DEPENDENCIES + cocoapods + rack! + thin! + + BUNDLED WITH + #{Bundler::VERSION} + L + end end |