Sha256: c0b01b09c351748820f15d3f8663e1f605b1bb1f12bdab74c0b33f1edfe6507c

Contents?: true

Size: 624 Bytes

Versions: 22

Compression:

Stored size: 624 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe YARD::CLI::Help do
  describe '#run' do
    it "should accept 'help command'" do
      CLI::Yardoc.should_receive(:run).with('--help')
      CLI::Help.run('doc')
    end

    it "should accept no arguments (lists all commands)" do
      CLI::CommandParser.should_receive(:run).with('--help')
      CLI::Help.run
    end

    it "should show all commands if command isn't found" do
      CLI::CommandParser.should_receive(:run).with('--help')
      help = CLI::Help.new
      help.should_receive(:puts).with(/not found/)
      help.run('unknown')
    end
  end
end

Version data entries

22 entries across 16 versions & 3 rubygems

Version Path
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-rolls-0.2.0 vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.8.3 vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.8.1 vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-rolls-0.1.0 vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.8.0.pre vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.7.1 vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.7.0 vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.7.0.pre2 vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.7.0.pre vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.6.2 vendor/bundle/gems/yard-0.8.2.1/spec/cli/help_spec.rb
challah-0.6.2 vendor/bundle/gems/yard-0.8.2/spec/cli/help_spec.rb
challah-0.6.2 vendor/bundle/gems/yard-0.8.1/spec/cli/help_spec.rb
yard-0.8.2.1 spec/cli/help_spec.rb
challah-0.6.1 vendor/bundle/gems/yard-0.8.2/spec/cli/help_spec.rb
challah-0.6.1 vendor/bundle/gems/yard-0.8.1/spec/cli/help_spec.rb
yard-0.8.2 spec/cli/help_spec.rb
challah-0.6.0 vendor/bundle/gems/yard-0.8.1/spec/cli/help_spec.rb