diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-08-05 16:50:52 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-25 11:16:58 -0500 |
commit | 8ae471e929e6c6d2cc30e8111bf68694702905f1 (patch) | |
tree | 75af028a8149679cace72029b3fb004fda1d7eb4 | |
parent | 46f375e19c7483a8a4c4f3c3b3338ed5334023bf (diff) | |
download | bundler-8ae471e929e6c6d2cc30e8111bf68694702905f1.tar.gz |
Add a helper to the_bundler to get a parsed lockfile
-rw-r--r-- | spec/support/the_bundle.rb | 5 |
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 |