diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/friendly_errors_spec.rb | 21 | ||||
-rw-r--r-- | spec/commands/binstubs_spec.rb (renamed from spec/other/binstubs_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/check_spec.rb (renamed from spec/other/check_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/clean_spec.rb (renamed from spec/other/clean_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/config_spec.rb (renamed from spec/other/config_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/console_spec.rb (renamed from spec/other/console_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/exec_spec.rb (renamed from spec/other/exec_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/help_spec.rb (renamed from spec/other/help_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/init_spec.rb (renamed from spec/other/init_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/licenses_spec.rb (renamed from spec/other/licenses_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/newgem_spec.rb (renamed from spec/other/newgem_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/open_spec.rb (renamed from spec/other/open_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/outdated_spec.rb (renamed from spec/other/outdated_spec.rb) | 0 | ||||
-rw-r--r-- | spec/commands/show_spec.rb (renamed from spec/other/show_spec.rb) | 0 | ||||
-rw-r--r-- | spec/other/cli_dispatch_spec.rb | 13 |
15 files changed, 21 insertions, 13 deletions
diff --git a/spec/bundler/friendly_errors_spec.rb b/spec/bundler/friendly_errors_spec.rb index bef049b588..02da1d4729 100644 --- a/spec/bundler/friendly_errors_spec.rb +++ b/spec/bundler/friendly_errors_spec.rb @@ -1,18 +1,13 @@ require "spec_helper" +require "bundler" +require "bundler/friendly_errors" -describe "friendly errors" do +describe Bundler, "friendly errors" do it "rescues ArgumentErrors" do - expect{ Bundler.with_friendly_errors { - raise ArgumentError.new("Ambiguous task") } }.not_to raise_error - end - - it "rescues ArgumentErrors" do - bundle :i - expect(err).to be_empty - end - - it "prints a friendly error message" do - bundle :i - expect(out).to match /A more helpful message/ + expect { + Bundler.with_friendly_errors do + raise ArgumentError.new("Ambiguous task") + end + }.to_not raise_error end end diff --git a/spec/other/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index 3d3ed0fc58..3d3ed0fc58 100644 --- a/spec/other/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb diff --git a/spec/other/check_spec.rb b/spec/commands/check_spec.rb index 248b5c2eed..248b5c2eed 100644 --- a/spec/other/check_spec.rb +++ b/spec/commands/check_spec.rb diff --git a/spec/other/clean_spec.rb b/spec/commands/clean_spec.rb index cee1312a5f..cee1312a5f 100644 --- a/spec/other/clean_spec.rb +++ b/spec/commands/clean_spec.rb diff --git a/spec/other/config_spec.rb b/spec/commands/config_spec.rb index 100889bce7..100889bce7 100644 --- a/spec/other/config_spec.rb +++ b/spec/commands/config_spec.rb diff --git a/spec/other/console_spec.rb b/spec/commands/console_spec.rb index b72883a01c..b72883a01c 100644 --- a/spec/other/console_spec.rb +++ b/spec/commands/console_spec.rb diff --git a/spec/other/exec_spec.rb b/spec/commands/exec_spec.rb index ed03e2b0a9..ed03e2b0a9 100644 --- a/spec/other/exec_spec.rb +++ b/spec/commands/exec_spec.rb diff --git a/spec/other/help_spec.rb b/spec/commands/help_spec.rb index 739f62224e..739f62224e 100644 --- a/spec/other/help_spec.rb +++ b/spec/commands/help_spec.rb diff --git a/spec/other/init_spec.rb b/spec/commands/init_spec.rb index 8bd566dcf5..8bd566dcf5 100644 --- a/spec/other/init_spec.rb +++ b/spec/commands/init_spec.rb diff --git a/spec/other/licenses_spec.rb b/spec/commands/licenses_spec.rb index c8d5ff739e..c8d5ff739e 100644 --- a/spec/other/licenses_spec.rb +++ b/spec/commands/licenses_spec.rb diff --git a/spec/other/newgem_spec.rb b/spec/commands/newgem_spec.rb index 7694e94740..7694e94740 100644 --- a/spec/other/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb diff --git a/spec/other/open_spec.rb b/spec/commands/open_spec.rb index b586376254..b586376254 100644 --- a/spec/other/open_spec.rb +++ b/spec/commands/open_spec.rb diff --git a/spec/other/outdated_spec.rb b/spec/commands/outdated_spec.rb index b498510ff7..b498510ff7 100644 --- a/spec/other/outdated_spec.rb +++ b/spec/commands/outdated_spec.rb diff --git a/spec/other/show_spec.rb b/spec/commands/show_spec.rb index bdd3a1f6a2..bdd3a1f6a2 100644 --- a/spec/other/show_spec.rb +++ b/spec/commands/show_spec.rb diff --git a/spec/other/cli_dispatch_spec.rb b/spec/other/cli_dispatch_spec.rb new file mode 100644 index 0000000000..cd1868aef5 --- /dev/null +++ b/spec/other/cli_dispatch_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +describe "bundle command names" do + it "work when given fully" + + it "work when not ambiguous" + + it "print a friendly error when ambiguous" do + bundle "i" + expect(out).to match(/helpful message/) + expect(err).to eq("") + end +end |