Sha256: 04e2751eca9e5732617a15c7e4234d52d17aabd8a5bb03292f08e6b77e3655ac

Contents?: true

Size: 541 Bytes

Versions: 5

Compression:

Stored size: 541 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

5 entries across 5 versions & 1 rubygems

Version Path
hammer_cli-3.13.0 test/unit/help/definition/note_test.rb
hammer_cli-3.12.0 test/unit/help/definition/note_test.rb
hammer_cli-3.10.0 test/unit/help/definition/note_test.rb
hammer_cli-3.9.0 test/unit/help/definition/note_test.rb
hammer_cli-3.8.0 test/unit/help/definition/note_test.rb