test/lib/vedeu/geometry/geometry_test.rb in vedeu-0.4.13 vs test/lib/vedeu/geometry/geometry_test.rb in vedeu-0.4.14

- old
+ new

@@ -38,11 +38,13 @@ it { instance.instance_variable_get('@width').must_equal(width) } it { instance.instance_variable_get('@x').must_equal(x) } it { instance.instance_variable_get('@xn').must_equal(xn) } it { instance.instance_variable_get('@y').must_equal(y) } it { instance.instance_variable_get('@yn').must_equal(yn) } - it { instance.instance_variable_get('@repository').must_equal(Vedeu.geometries) } + it do + instance.instance_variable_get('@repository').must_equal(Vedeu.geometries) + end end describe '#top, #right, #bottom, #left' do context 'centred is true' do let(:attributes) { { height: 6, width: 18, centred: true } } @@ -83,18 +85,18 @@ context 'centred is false and y is set' do let(:attributes) { { height: 6, width: 18, y: 4 } } it { instance.top.must_equal(4) } it { instance.right.must_equal(18) } - it { instance.bottom.must_equal(10) } + it { instance.bottom.must_equal(9) } it { instance.left.must_equal(1) } end context 'centred is false and x is set' do let(:attributes) { { height: 6, width: 18, x: 4 } } it { instance.top.must_equal(1) } - it { instance.right.must_equal(22) } + it { instance.right.must_equal(21) } it { instance.bottom.must_equal(6) } it { instance.left.must_equal(4) } end end