test/lib/vedeu/terminal/terminal_test.rb in vedeu-0.8.4 vs test/lib/vedeu/terminal/terminal_test.rb in vedeu-0.8.5
- old
+ new
@@ -110,24 +110,16 @@
it 'shows the cursor in cooked mode' do
described.cooked_mode!
subject.must_equal(["\e[?25h"])
end
- it 'hides the cursor in raw mode' do
+ it 'leaves the cursor hidden in raw mode' do
described.raw_mode!
subject.must_equal(nil)
end
end
-
- describe '.cursor' do
- subject { described.cursor }
-
- #it { subject.must_be_instance_of(Array) }
- #it { subject.must_be_instance_of(Vedeu::Geometries::Position) }
- end
-
describe '.centre' do
subject { described.centre }
it { subject.must_be_instance_of(Array) }
@@ -159,53 +151,20 @@
describe '.origin' do
subject { Vedeu::Terminal.origin }
it { subject.must_be_instance_of(Fixnum) }
it { subject.must_equal(1) }
- it { described.must_respond_to(:x) }
- it { described.must_respond_to(:y) }
it { described.must_respond_to(:tx) }
it { described.must_respond_to(:ty) }
end
- describe '.width' do
- subject { Vedeu::Terminal.width }
-
- it { subject.must_be_instance_of(Fixnum) }
- it { described.must_respond_to(:xn) }
- it { described.must_respond_to(:txn) }
-
- context 'when the terminal is an odd number of characters in width' do
- it 'returns the width' do
- subject.must_equal(40)
- end
- end
- end
-
- describe '.height' do
- subject { Vedeu::Terminal.height }
-
- it { subject.must_be_instance_of(Fixnum) }
- it { described.must_respond_to(:yn) }
- it { described.must_respond_to(:tyn) }
-
- context 'when the terminal is an odd number of characters in height' do
- it 'returns the height' do
- subject.must_equal(24)
- end
- end
- end
-
describe '.size' do
subject { Vedeu::Terminal.size }
it { subject.must_be_instance_of(Array) }
- context 'when the terminal is an odd number of characters in height or ' \
- 'width' do
- it 'returns the width and height' do
- subject.must_equal([24, 40])
- end
+ it 'returns the width and height' do
+ subject.must_equal([25, 40])
end
end
describe '.console' do
it 'returns the console' do