summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-08-05 16:50:52 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-08-25 11:16:58 -0500
commit8ae471e929e6c6d2cc30e8111bf68694702905f1 (patch)
tree75af028a8149679cace72029b3fb004fda1d7eb4
parent46f375e19c7483a8a4c4f3c3b3338ed5334023bf (diff)
downloadbundler-8ae471e929e6c6d2cc30e8111bf68694702905f1.tar.gz
Add a helper to the_bundler to get a parsed lockfile
-rw-r--r--spec/support/the_bundle.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/the_bundle.rb b/spec/support/the_bundle.rb
index 86df9cd9c7..742d393425 100644
--- a/spec/support/the_bundle.rb
+++ b/spec/support/the_bundle.rb
@@ -27,5 +27,10 @@ module Spec
def lockfile
bundle_dir.join("Gemfile.lock")
end
+
+ def locked_gems
+ raise "Cannot read lockfile if it doesn't exist" unless locked?
+ Bundler::LockfileParser.new(lockfile.read)
+ end
end
end