summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoggs <hello@boggs.xyz>2016-08-10 18:03:19 +0800
committerBoggs <hello@boggs.xyz>2016-08-17 13:21:25 +0800
commitc28268365a9cabc55d511a208f8047795be55001 (patch)
treee613266917a52d510c501bd4d257a867dd879ded
parent2c261ade6946a2c3f9e17c10511fc8e0a276e1e5 (diff)
downloadbundler-c28268365a9cabc55d511a208f8047795be55001.tar.gz
Update specs
-rw-r--r--spec/commands/exec_spec.rb2
-rw-r--r--spec/install/post_bundle_message_spec.rb17
2 files changed, 17 insertions, 2 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index e1b94d80d5..3d861c0799 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -539,7 +539,7 @@ describe "bundle exec" do
let(:exit_code) { Bundler::GemNotFound.new.status_code }
let(:expected) { <<-EOS.strip }
-\e[31mCould not find gem 'rack (= 2)' in any of the gem sources listed in your Gemfile or available on this machine.\e[0m
+\e[31mCould not find gem 'rack (= 2)' in any of the gem sources listed in your Gemfile.\e[0m
\e[33mRun `bundle install` to install missing gems.\e[0m
EOS
diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb
index 10c71f0a51..7e2eacfb90 100644
--- a/spec/install/post_bundle_message_spec.rb
+++ b/spec/install/post_bundle_message_spec.rb
@@ -104,7 +104,22 @@ describe "post bundle message" do
gem "rack"
gem "not-a-gem", :group => :development
G
- expect(out).to include("Could not find gem 'not-a-gem' in any of the gem sources listed in your Gemfile or available on this machine.")
+ expect(out).to include("Could not find gem 'not-a-gem' in any of the gem sources listed in your Gemfile.")
+ end
+
+ it "should report a helpful error message with reference to cache if available" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+ bundle :cache
+ expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ gem "not-a-gem", :group => :development
+ G
+ expect(out).to include("Could not find gem 'not-a-gem' in any of the gem sources listed in your Gemfile or in gems cached in vendor/cache.")
end
end
end