Sha256: b0f5024cacaf5d72941d4fea57d68f3893a28de82f60c757211ca2596485d0ba

Contents?: true

Size: 535 Bytes

Versions: 26

Compression:

Stored size: 535 Bytes

Contents

require File.join(File.dirname(__FILE__), '../../test_helper')

describe HammerCLI::Help::Note do
  describe '#build_string' do
    let(:text) { 'text' }
    let(:note) { HammerCLI::Help::Note.new(text) }

    it 'builds string' do
      note.build_string.must_equal 'NOTE: text'
    end

    it 'ensures that options are used' do
      label = 'DEPRECATION'
      note = HammerCLI::Help::Note.new(text, label: label, richtext: true)
      note.build_string.must_equal "#{HighLine.color("#{label}:", :bold)} #{text}"
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
hammer_cli-3.7.0 test/unit/help/definition/note_test.rb
hammer_cli-3.5.1 test/unit/help/definition/note_test.rb
hammer_cli-3.6.0 test/unit/help/definition/note_test.rb
hammer_cli-3.5.0 test/unit/help/definition/note_test.rb
hammer_cli-3.4.0 test/unit/help/definition/note_test.rb
hammer_cli-3.3.0 test/unit/help/definition/note_test.rb
hammer_cli-3.2.0 test/unit/help/definition/note_test.rb
hammer_cli-3.1.1 test/unit/help/definition/note_test.rb
hammer_cli-3.0.2 test/unit/help/definition/note_test.rb
hammer_cli-3.1.0 test/unit/help/definition/note_test.rb
hammer_cli-3.0.1 test/unit/help/definition/note_test.rb
hammer_cli-3.0.0 test/unit/help/definition/note_test.rb
hammer_cli-2.5.1 test/unit/help/definition/note_test.rb
hammer_cli-2.5.0 test/unit/help/definition/note_test.rb
hammer_cli-2.3.1 test/unit/help/definition/note_test.rb
hammer_cli-2.4.0 test/unit/help/definition/note_test.rb
hammer_cli-2.3.0 test/unit/help/definition/note_test.rb
hammer_cli-2.2.1 test/unit/help/definition/note_test.rb
hammer_cli-2.1.2 test/unit/help/definition/note_test.rb
hammer_cli-2.2.0 test/unit/help/definition/note_test.rb