diff options
author | Jessica Lynn Suttles <jlsuttles@gmail.com> | 2013-07-29 16:31:31 -0700 |
---|---|---|
committer | Jessica Lynn Suttles <jlsuttles@gmail.com> | 2013-08-05 14:16:01 -0700 |
commit | 8d385e0dd7b4b41a2b421602f22c2bfd18670af4 (patch) | |
tree | 719f7f49db23d097bba33f9792b1f4861eb15ce2 /spec/other | |
parent | 0750d45b3933a5d1f28ebf4494c8505739a3a827 (diff) | |
download | bundler-8d385e0dd7b4b41a2b421602f22c2bfd18670af4.tar.gz |
trying to get specs to pass
overrides Thor#start in Bundler::CLI to ensure Bundler.ui is set to UI::Shell.new
fixes typo in friendly error message
only sets UI::Sell.new in Bundler::CLI#start if exception is raised
fixes typo in lib
adds more specs
rescues Thor::AmbiguousTaskError instead of ArgumentError
removes message from spec as it's not needed
Diffstat (limited to 'spec/other')
-rw-r--r-- | spec/other/cli_dispatch_spec.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/other/cli_dispatch_spec.rb b/spec/other/cli_dispatch_spec.rb index cd1868aef5..7cb60f8834 100644 --- a/spec/other/cli_dispatch_spec.rb +++ b/spec/other/cli_dispatch_spec.rb @@ -1,13 +1,21 @@ -require 'spec_helper' +require "spec_helper" describe "bundle command names" do - it "work when given fully" + it "work when given fully" do + bundle "install" + expect(err).to eq("") + expect(out).to match(/Bundler::GemfileNotFound/) + end - it "work when not ambiguous" + it "work when not ambiguous" do + bundle "ins" + expect(err).to eq("") + expect(out).to match(/Bundler::GemfileNotFound/) + end it "print a friendly error when ambiguous" do bundle "i" - expect(out).to match(/helpful message/) expect(err).to eq("") + expect(out).to match(/Ambiguous command i matches \[init, inject, install\]/) end end |