Sha256: 4f5319d895c6a36f06a97bdcf44d6c0cebc6edab807838fdb70e5d58764c56e2
Contents?: true
Size: 762 Bytes
Versions: 5
Compression:
Stored size: 762 Bytes
Contents
require File.join(File.dirname(__FILE__), '../../test_helper') describe HammerCLI::Help::Section do describe '#build_string' do let(:section) { HammerCLI::Help::Section.new('section') } let(:first_text) { HammerCLI::Help::Text.new('first') } let(:second_text) { HammerCLI::Help::Text.new('second') } it 'builds string without definition' do _(section.build_string).must_equal "section:\n\n" end it 'builds string with definition' do section.definition = HammerCLI::Help::Definition.new([first_text, second_text]) expected_output = [ 'section:', ' first', '', ' second', '' ].join("\n") _(section.build_string).must_equal expected_output end end end
Version data entries
5 entries across 5 versions & 1 rubygems