Sha256: 0039154a62fb45a27b82f41fde6aa1c84be0a99be13b0f6857355c8bdaaff1ae
Contents?: true
Size: 1.32 KB
Versions: 1
Compression:
Stored size: 1.32 KB
Contents
require 'test_helper' module Vedeu module Cells describe Border do let(:described) { Vedeu::Cells::Border } let(:instance) { described.new(attributes) } let(:attributes) { { value: _value } } let(:_value) {} describe '#attributes' do subject { instance.attributes } it { subject.must_be_instance_of(Hash) } end describe '#cell?' do subject { instance.cell? } it { subject.must_equal(false) } end describe '#name=' do subject { instance.name=(_value) } # @todo Add more tests. end describe '#value' do subject { instance.value } context 'when the value is a horizontal border character' do let(:_value) { "\x71" } it { subject.must_equal("\e(0q\e(B") } end context 'when the value is a vertical border character' do let(:_value) { "\x78" } it { subject.must_equal("\e(0x\e(B") } end context 'when the value is a corner border character' do let(:_value) { "\x6A" } it { subject.must_equal("\e(0j\e(B") } end context 'when the value is nil or empty' do it { subject.must_equal('') } end end end # Border end # Cells end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.8.0 | test/lib/vedeu/cells/border_test.rb |