Sha256: b42adefaabb72d45d56f9e31e66561a973b56e622fab36500d66632b9b8c4bb0

Contents?: true

Size: 623 Bytes

Versions: 46

Compression:

Stored size: 623 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
      log.should_receive(:puts).with(/not found/)
      help.run('unknown')
    end
  end
end

Version data entries

46 entries across 38 versions & 7 rubygems

Version Path
yard-0.8.7.6 spec/cli/help_spec.rb
yard-0.8.7.5 spec/cli/help_spec.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
yard-0.8.7.4 spec/cli/help_spec.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
climine-0.0.2 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
climine-0.0.1 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/cli/help_spec.rb
yard-0.8.7.3 spec/cli/help_spec.rb
yard-0.8.7.2 spec/cli/help_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/yard-0.8.7/spec/cli/help_spec.rb
candlepin-api-0.4.0 bundle/ruby/gems/yard-0.8.7/spec/cli/help_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/yard-0.8.7/spec/cli/help_spec.rb
yard-0.8.7.1 spec/cli/help_spec.rb