Sha256: da6f95085acb2a548f77a3c32e563ce1ab8b81f58c97b2ced1b29221d3572a29

Contents?: true

Size: 1.93 KB

Versions: 6

Compression:

Stored size: 1.93 KB

Contents

require 'test_helper'

module Vedeu

  module Null

    describe Border do

      let(:described) { Vedeu::Null::Border }
      let(:instance)  { described.new(_name) }
      let(:_name)     { 'null_border' }
      let(:geometry)  {
        Vedeu::Geometry.new(name: _name, x: 4, y: 6, xn: 10, yn: 12)
      }

      before { Vedeu.geometries.stubs(:by_name).returns(geometry) }

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

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

        it { subject.must_be_instance_of(Fixnum) }
        it { subject.must_equal(4) }
      end

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

        it { subject.must_be_instance_of(Fixnum) }
        it { subject.must_equal(6) }
      end

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

        it { subject.must_be_instance_of(Fixnum) }
        it { subject.must_equal(10) }
      end

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

        it { subject.must_be_instance_of(Fixnum) }
        it { subject.must_equal(12) }
      end

      describe '#enabled?' do
        subject { instance.enabled? }

        it { subject.must_be_instance_of(FalseClass) }
      end

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

        it { subject.must_be_instance_of(Fixnum) }
        it { subject.must_equal(7) }
      end

      describe '#null?' do
        subject { instance.null? }

        it { subject.must_be_instance_of(TrueClass) }
      end

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

        it { subject.must_be_instance_of(Array) }
        it { subject.must_equal([]) }
      end

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

        it { subject.must_be_instance_of(Fixnum) }
        it { subject.must_equal(7) }
      end

    end # Border

  end # Null

end # Vedeu

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.4.54 test/lib/vedeu/null/border_test.rb
vedeu-0.4.53 test/lib/vedeu/null/border_test.rb
vedeu-0.4.52 test/lib/vedeu/null/border_test.rb
vedeu-0.4.51 test/lib/vedeu/null/border_test.rb
vedeu-0.4.50 test/lib/vedeu/null/border_test.rb
vedeu-0.4.49 test/lib/vedeu/null/border_test.rb