aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli/doctor_spec.rb
blob: e3967060ed6bc2b7ff27707fefc501a770d55ac1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require_relative "shared_examples/invalid_option"

describe Hbc::CLI::Doctor, :cask do
  it_behaves_like "a command that handles invalid options"

  it "displays some nice info about the environment" do
    expect {
      Hbc::CLI::Doctor.run
    }.to output(/\A==> Homebrew-Cask Version/).to_stdout
  end

  it "raises an exception when arguments are given" do
    expect {
      Hbc::CLI::Doctor.run("argument")
    }.to raise_error(ArgumentError)
  end
end