Sha256: 1c9afbb3059a88c38ac2e4a93022b5a9bd3ab16513cf35afbdc0dc3e780e13f4
Contents?: true
Size: 756 Bytes
Versions: 31
Compression:
Stored size: 756 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
31 entries across 31 versions & 1 rubygems