test/lib/vedeu/dsl/geometry_test.rb in vedeu-0.4.53 vs test/lib/vedeu/dsl/geometry_test.rb in vedeu-0.4.54
- old
+ new
@@ -57,10 +57,22 @@
describe '#columns' do
subject { instance.columns(3) }
it { subject.must_equal(18) }
+
+ context 'DSL #columns' do
+ before { Vedeu.stubs(:width).returns(80) }
+
+ subject {
+ Vedeu.geometry 'geometry' do
+ width columns(8)
+ end
+ }
+
+ it { subject.width.must_equal(48) }
+ end
end
describe '#height' do
subject { instance.height(6) }
@@ -85,9 +97,21 @@
describe '#rows' do
subject { instance.rows(3) }
it { subject.must_equal(6) }
+
+ context 'DSL #rows' do
+ before { Vedeu.stubs(:height).returns(38) }
+
+ subject {
+ Vedeu.geometry 'geometry' do
+ height rows(8)
+ end
+ }
+
+ it { subject.height.must_equal(24) }
+ end
end
describe '#use' do
before do
Vedeu.geometry 'some_geometry' do