Sha256: dbd63a9c35e9758c3721f95475cf05fda7b8f8a7e6f56a6003abd75e0707d7ab

Contents?: true

Size: 631 Bytes

Versions: 2

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

RSpec.describe YARD::CLI::Help do
  describe "#run" do
    it "accepts help command" do
      expect(CLI::Yardoc).to receive(:run).with('--help')
      CLI::Help.run('doc')
    end

    it "accepts no arguments (and lists all commands)" do
      expect(CLI::CommandParser).to receive(:run).with('--help')
      CLI::Help.run
    end

    it "shows all commands if command isn't found" do
      expect(CLI::CommandParser).to receive(:run).with('--help')
      help = CLI::Help.new
      expect(log).to receive(:puts).with(/not found/)
      help.run('unknown')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yard-0.9.18 spec/cli/help_spec.rb
yard-0.9.17 spec/cli/help_spec.rb