summaryrefslogtreecommitdiff
path: root/spec/lock/lockfile_spec.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2014-08-23 18:24:46 -0500
committerAndre Arko <andre@arko.net>2014-08-23 18:27:33 -0500
commita86a538b47ea4691f1553c56670b63365d2c9c0f (patch)
treed3eeb70dc646e47d4eeef754d32c252c6a7aabbf /spec/lock/lockfile_spec.rb
parentcfffd966c1a26e411ba169bec928be7405768ec7 (diff)
downloadbundler-a86a538b47ea4691f1553c56670b63365d2c9c0f.tar.gz
Verify source sorting
Diffstat (limited to 'spec/lock/lockfile_spec.rb')
-rw-r--r--spec/lock/lockfile_spec.rb41
1 files changed, 40 insertions, 1 deletions
diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb
index 3db48955ed..364b97181a 100644
--- a/spec/lock/lockfile_spec.rb
+++ b/spec/lock/lockfile_spec.rb
@@ -146,7 +146,7 @@ describe "the lockfile format" do
G
end
- it "does not assplode when a platform specific dependency is present and the Gemfile has not been resolved on that platform" do
+ it "does not asplode when a platform specific dependency is present and the Gemfile has not been resolved on that platform" do
build_lib "omg", :path => lib_path('omg')
gemfile <<-G
@@ -287,6 +287,45 @@ describe "the lockfile format" do
G
end
+ it "sorts serialized sources by type" do
+ build_lib "foo"
+ bar = build_git "bar"
+
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+ gem "foo", :path => "#{lib_path("foo-1.0")}"
+ gem "bar", :git => "#{lib_path("bar-1.0")}"
+ G
+
+ lockfile_should_be <<-G
+ GIT
+ remote: #{lib_path("bar-1.0")}
+ revision: #{bar.ref_for('master')}
+ 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)
+
+ PLATFORMS
+ #{generic(Gem::Platform.local)}
+
+ DEPENDENCIES
+ bar!
+ foo!
+ rack
+ G
+ end
+
it "lists gems alphabetically" do
install_gemfile <<-G
source "file://#{gem_repo1}"