Sha256: 1d9d5d678698bb0b0560ade0870667ff47640e7139e76732065d3c7eefd91e15

Contents?: true

Size: 1.76 KB

Versions: 15

Compression:

Stored size: 1.76 KB

Contents

require 'test_helper'

module Vedeu

  module Null

    describe Geometry do

      let(:described) { Vedeu::Null::Geometry }
      let(:instance)  { described.new(_name) }
      let(:_name)     { 'null_geometry' }

      before do
        Vedeu::Terminal.stubs(:height).returns(25)
        Vedeu::Terminal.stubs(:width).returns(40)
      end

      describe '#initialize' do
        it { instance.must_be_instance_of(described) }
        it { instance.instance_variable_get('@name').must_equal(_name) }
      end

      describe '#maximised' do
        it { instance.must_respond_to(:maximised) }
      end

      describe '#maximised=' do
        it { instance.must_respond_to(:maximised=) }
      end

      describe '#name' do
        it { instance.must_respond_to(:name) }
      end

      describe '#centred' do
        subject { instance.centred }

        it { subject.must_equal(false) }
      end

      describe '#maximise' do
        subject { instance.maximise }

        it { subject.must_equal(false) }
      end

      describe '#store' do
        subject { instance.store }

        it { subject.must_be_instance_of(described) }
      end

      describe '#unmaximise' do
        subject { instance.unmaximise }

        it { subject.must_equal(false) }
      end

      describe '#height' do
        it { instance.height.must_equal(25) }
      end

      describe '#width' do
        it { instance.width.must_equal(40) }
      end

      describe '#x' do
        it { instance.x.must_equal(1) }
      end

      describe '#xn' do
        it { instance.xn.must_equal(40) }
      end

      describe '#y' do
        it { instance.y.must_equal(1) }
      end

      describe '#yn' do
        it { instance.yn.must_equal(25) }
      end

    end # Geometry

  end # Null

end # Vedeu

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vedeu-0.4.48 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.47 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.46 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.45 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.44 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.43 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.42 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.41 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.40 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.39 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.38 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.37 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.36 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.35 test/lib/vedeu/null/geometry_test.rb
vedeu-0.4.34 test/lib/vedeu/null/geometry_test.rb