Sha256: 01141aeaa6345cf42963b51d5897a506f481be2c887c7c1efb129c39c2fba067
Contents?: true
Size: 1020 Bytes
Versions: 4
Compression:
Stored size: 1020 Bytes
Contents
require_relative '../../../test_helper' module Vedeu describe Position do let(:described_class) { Position } let(:described_instance) { described_class.new } it { described_instance.must_be_instance_of(Position) } describe '.set' do let(:subject) { described_class.set } it { subject.must_be_instance_of(String) } context 'when no coordinates are provided' do it 'returns a position escape sequence' do subject.must_equal('') end end context 'when coordinates are provided' do let(:subject) { described_class.set(y, x) } let(:y) { 12 } let(:x) { 19 } it 'returns a position escape sequence' do subject.must_equal("\e[12;19H") end end end describe '.reset' do let(:subject) { described_class.reset } it { subject.must_be_instance_of(String) } it 'returns a position escape sequence' do subject.must_equal("\e[1;1H") end end end end
Version data entries
4 entries across 4 versions & 1 rubygems