summaryrefslogtreecommitdiff
path: root/spec/commands/info_spec.rb
diff options
context:
space:
mode:
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