test/lib/vedeu/cursors/cursor_test.rb in vedeu-0.6.14 vs test/lib/vedeu/cursors/cursor_test.rb in vedeu-0.6.15

- old
+ new

@@ -70,10 +70,30 @@ it { instance.must_respond_to(:state) } it { instance.must_respond_to(:x=) } it { instance.must_respond_to(:y=) } end + describe '.store' do + subject { described.store(attributes) } + + it { subject.must_equal(instance) } + end + + describe '#eql?' do + let(:other) { instance } + + subject { instance.eql?(other) } + + it { subject.must_equal(true) } + + context 'when different to other' do + let(:other) { described.new(name: 'other_cursor') } + + it { subject.must_equal(false) } + end + end + describe '#hide' do let(:visible) { true } let(:hide_cursor) { Vedeu::Models::Escape .new(value: Vedeu::EscapeSequences::Esc.hide_cursor) @@ -222,11 +242,11 @@ subject { instance.reposition(new_y, new_x) } it { subject.must_be_instance_of(described) } - it { subject.x.must_equal(8) } - it { subject.y.must_equal(7) } + it { subject.x.must_equal(10) } + it { subject.y.must_equal(8) } it { subject.ox.must_equal(5) } it { subject.oy.must_equal(3) } end describe '#to_s' do