Sha256: 1dcdc48d3c5bce9c34aa099bfe592675f95c74ab7167b3b7f5d142784f03a37e

Contents?: true

Size: 891 Bytes

Versions: 6

Compression:

Stored size: 891 Bytes

Contents

describe Commander::HelpFormatter do
  
  before :each do
    @input = StringIO.new
    @output = StringIO.new
    $terminal = HighLine.new @input, @output
  end
  
  it "should display global help using --help switch" do
    new_command_runner '--help'
    program :help_formatter, Commander::HelpFormatter::Base
    command_runner.run!
    @output.string.should eql("Implement global help here\n")
  end
  
  it "should display global help using help command" do
    new_command_runner 'help'
    program :help_formatter, Commander::HelpFormatter::Base
    command_runner.run!
    @output.string.should eql("Implement global help here\n")
  end
  
  it "should display command help" do
    new_command_runner 'help', 'test'
    program :help_formatter, Commander::HelpFormatter::Base
    command_runner.run!
    @output.string.should eql("Implement help for test here\n")
  end
      
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
visionmedia-commander-2.4.2 spec/help_formatter_spec.rb
visionmedia-commander-2.4.3 spec/help_formatter_spec.rb
visionmedia-commander-2.4.4 spec/help_formatter_spec.rb
visionmedia-commander-2.4.6 spec/help_formatter_spec.rb
visionmedia-commander-2.5.6 spec/help_formatter_spec.rb
visionmedia-commander-2.5.7 spec/help_formatter_spec.rb