test/lib/vedeu/repository/interface_test.rb in vedeu-0.0.16 vs test/lib/vedeu/repository/interface_test.rb in vedeu-0.0.17
- old
+ new
@@ -11,11 +11,12 @@
width: 40,
height: 5,
x: 1,
y: 1,
fg: :red,
- bg: :blue
+ bg: :blue,
+ cursor: true,
}
}
let(:result) {}
it 'returns an Interface instance' do
@@ -63,9 +64,27 @@
describe '#colour' do
let(:subject) { described_instance.colour }
it 'returns a Colour' do
subject.must_be_instance_of(Colour)
+ end
+ end
+
+ describe '#cursor' do
+ let(:subject) { described_instance.cursor }
+
+ context 'when the cursor is on' do
+ it 'returns an escape sequence' do
+ subject.must_be_instance_of(String)
+ end
+ end
+
+ context 'when the cursor is off' do
+ let(:attributes) { { cursor: false } }
+
+ it 'returns an escape sequence' do
+ subject.must_be_instance_of(String)
+ end
end
end
end
end