summaryrefslogtreecommitdiff
path: root/spec/commands/info_spec.rb
diff options
context:
space:
mode:
authorFrederico Bittencourt <fred.rbittencourt@gmail.com>2016-10-15 15:07:19 -0300
committerFrederico Bittencourt <fred.rbittencourt@gmail.com>2016-10-15 15:07:19 -0300
commite5d61e093d28c7c9a4e002b135fb5d72284e3d1e (patch)
tree534619c4ee0c521b46b481100051ed0d041434de /spec/commands/info_spec.rb
parentbc746cbd8d13df66425f661371115ae092dcaff7 (diff)
downloadbundler-e5d61e093d28c7c9a4e002b135fb5d72284e3d1e.tar.gz
show specific gem details with 'bundle info GEM'
Diffstat (limited to 'spec/commands/info_spec.rb')
-rw-r--r--spec/commands/info_spec.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/commands/info_spec.rb b/spec/commands/info_spec.rb
new file mode 100644
index 0000000000..6366f7f9ed
--- /dev/null
+++ b/spec/commands/info_spec.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+require "spec_helper"
+
+describe "bunlde info" do
+
+ context "info from specific gem in gemfile" do
+ before :each do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rails"
+ G
+ end
+
+ it "should print summary of rake gem" do
+ bundle "info rails"
+
+ expect(out).to include("rails")
+ expect(out).to include("\tSummary:")
+ expect(out).to include("\tHomepage:")
+ expect(out).to include("\tStatus:")
+ end
+
+ it "should print gem path" do
+ bundle "info rails --path"
+ expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s)
+ end
+
+ it "should create a Gemfile.lock if not existing" do
+ FileUtils.rm("Gemfile.lock")
+
+ bundle "info rails"
+
+ expect(bundled_app("Gemfile.lock")).to exist
+ end
+
+ end
+end