brew/Library/Homebrew/test/cask/cmd/doctor_spec.rb
2020-08-13 05:15:15 +02:00

20 lines
514 B
Ruby

# frozen_string_literal: true
require_relative "shared_examples/invalid_option"
describe Cask::Cmd::Doctor, :cask do
it_behaves_like "a command that handles invalid options"
it "displays some nice info about the environment" do
expect {
described_class.run
}.to output(/^==> Homebrew Version/).to_stdout
end
it "raises an exception when arguments are given" do
expect {
described_class.run("argument")
}.to raise_error(UsageError, /does not take named arguments/)
end
end