test/lib/vedeu/geometry/geometry_test.rb in vedeu-0.6.34 vs test/lib/vedeu/geometry/geometry_test.rb in vedeu-0.6.35

- old
+ new

@@ -8,10 +8,11 @@ let(:described) { Vedeu::Geometry::Geometry } let(:instance) { described.new(attributes) } let(:attributes) { { + alignment: alignment, centred: centred, client: client, height: height, maximised: maximised, name: _name, @@ -21,10 +22,11 @@ xn: xn, y: y, yn: yn, } } + let(:alignment) {} let(:centred) { false } let(:client) {} let(:height) {} let(:maximised) { false } let(:_name) { 'vedeu_geometry_geometry' } @@ -36,10 +38,11 @@ before { Vedeu::Terminal.stubs(:size).returns([12, 40]) } describe '#initialize' do it { instance.must_be_instance_of(described) } + it { instance.instance_variable_get('@alignment').must_equal(alignment) } it { instance.instance_variable_get('@centred').must_equal(centred) } it { instance.instance_variable_get('@client').must_equal(client) } it { instance.instance_variable_get('@height').must_equal(height) } it { instance.instance_variable_get('@maximised').must_equal(maximised) } it { instance.instance_variable_get('@name').must_equal(_name) } @@ -54,13 +57,14 @@ end end describe 'accessors' do it { + instance.must_respond_to(:alignment) + instance.must_respond_to(:alignment=) instance.must_respond_to(:centred) instance.must_respond_to(:centred=) - instance.must_respond_to(:attributes) instance.must_respond_to(:name) instance.must_respond_to(:name=) instance.must_respond_to(:height=) instance.must_respond_to(:maximised) instance.must_respond_to(:maximised?) @@ -75,9 +79,18 @@ describe '.store' do subject { described.store(attributes) } it { subject.must_equal(instance) } + end + + describe '#attributes' do + subject { instance.attributes } + + it { subject.must_be_instance_of(Hash) } + + # @todo Add more tests. + # it { skip } end describe '#eql?' do let(:other) { instance }