2018-11-02 19:07:56 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
RSpec.describe "bundle command names" do
|
|
|
|
it "work when given fully" do
|
2020-06-03 12:43:17 -04:00
|
|
|
bundle "install", :raise_on_error => false
|
2019-06-01 05:49:40 -04:00
|
|
|
expect(err).to eq("Could not locate Gemfile")
|
2018-11-02 19:07:56 -04:00
|
|
|
expect(last_command.stdboth).not_to include("Ambiguous command")
|
|
|
|
end
|
|
|
|
|
|
|
|
it "work when not ambiguous" do
|
2020-06-03 12:43:17 -04:00
|
|
|
bundle "ins", :raise_on_error => false
|
2019-06-01 05:49:40 -04:00
|
|
|
expect(err).to eq("Could not locate Gemfile")
|
2018-11-02 19:07:56 -04:00
|
|
|
expect(last_command.stdboth).not_to include("Ambiguous command")
|
|
|
|
end
|
|
|
|
|
|
|
|
it "print a friendly error when ambiguous" do
|
2020-06-03 12:43:17 -04:00
|
|
|
bundle "in", :raise_on_error => false
|
2019-06-01 05:49:40 -04:00
|
|
|
expect(err).to eq("Ambiguous command in matches [info, init, inject, install]")
|
2018-11-02 19:07:56 -04:00
|
|
|
end
|
|
|
|
end
|