Sha256: 57fa6e3a1f3a34eb04a57c0b6ab27ba157995d7b005e43cca9e56ce547d08921

Contents?: true

Size: 1.95 KB

Versions: 35

Compression:

Stored size: 1.95 KB

Contents

require 'test_helper'

module Vedeu

  module Borders

    describe Null do

      let(:described) { Vedeu::Borders::Null }
      let(:instance)  { described.new(attributes) }
      let(:attributes){
        {
          name: _name
        }
      }
      let(:_name)     { 'null_border' }
      let(:geometry)  {
        Vedeu::Geometry::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('@attributes').must_equal(attributes)
        }
        it { instance.instance_variable_get('@name').must_equal(_name) }
      end

      describe 'accessors' do
        it { instance.must_respond_to(: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 '#height' do
        subject { instance.height }

        it { subject.must_be_instance_of(Fixnum) }
        it { subject.must_equal(7) }
      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 # Null

  end # Borders

end # Vedeu

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
vedeu-0.6.56 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.54 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.53 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.52 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.51 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.50 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.49 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.48 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.47 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.46 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.45 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.44 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.43 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.42 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.41 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.40 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.39 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.38 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.37 test/lib/vedeu/borders/null_test.rb
vedeu-0.6.36 test/lib/vedeu/borders/null_test.rb