Sha256: a549bb53723ac4b5c979c63ee399dd0df02bae63a187177fea336d483847d2fd
Contents?: true
Size: 1.08 KB
Versions: 5
Compression:
Stored size: 1.08 KB
Contents
require_relative "spec_helper" include CliTester include GivenFilesystemSpecHelpers describe "Command line interface" do describe "shows error" do it "when command does not exist" do expect(run_command(args: ["abc"])).to exit_with_success("", /abc/) end it "when global option does not exist" do expect(run_command(args: ["--abc"])).to exit_with_success("", /--abc/) end it "when command option does not exist" do expect(run_command(args: ["list", "--abc"])).to exit_with_success("", /--abc/) end end describe "global options" do use_given_filesystem it "recognizes --offline option" do dir = given_directory_from_data("manifests") # This doesn't make much sense to a user, but that's what it is right now. # It will go away when we switched to GLI expected_stderr = <<-EOT ERROR: "inqlude global" was called with arguments ["list"] Usage: "inqlude global" EOT expect(run_command(args: ["--offline", "list", "--manifest_dir=#{dir}"])) .to exit_with_success("", expected_stderr) end end end
Version data entries
5 entries across 5 versions & 1 rubygems