Sha256: a38f5d172f2e5832742e2261e99ef357076c341bcf08ca513c6375e3b7a89d95

Contents?: true

Size: 1.69 KB

Versions: 17

Compression:

Stored size: 1.69 KB

Contents

require 'test_helper'

module Vedeu

  module Geometries

    describe XDimension do

      let(:described)  { Vedeu::Geometries::XDimension }
      let(:instance)   { described.new(attributes) }
      let(:attributes) {
        {
          d:                    d,
          dn:                   dn,
          d_dn:                 d_dn,
          default:              default,
          maximised:            maximised,
          horizontal_alignment: horizontal_alignment,
          vertical_alignment:   vertical_alignment,
        }
      }
      let(:d)                    {}
      let(:dn)                   {}
      let(:d_dn)                 {}
      let(:default)              { Vedeu.width }
      let(:maximised)            {}
      let(:horizontal_alignment) {}
      let(:vertical_alignment)   {}

      before do
        Vedeu.stubs(:width).returns(24)
      end

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

        it { subject.must_be_instance_of(Array) }

        context 'with default attributes' do
          it { subject.must_equal([1, 24]) }
        end

        context 'when maximised' do
          let(:maximised) { true }

          it { subject.must_equal([1, 24]) }
        end

        context 'when centre aligned' do
          let(:horizontal_alignment) { :centre }

          it { subject.must_equal([1, 24]) }
        end

        context 'when left aligned' do
          let(:horizontal_alignment) { :left }

          it { subject.must_equal([1, 24]) }
        end

        context 'when right aligned' do
          let(:horizontal_alignment) { :right }

          it { subject.must_equal([1, 24]) }
        end
      end

    end # XDimension

  end # Geometries

end # Vedeu

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
vedeu-0.8.0 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.7.4 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.7.3 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.7.2 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.7.1 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.7.0 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.6.71 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.6.70 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.6.69 test/lib/vedeu/geometries/area/x_dimension_test.rb
vedeu-0.6.68 test/lib/vedeu/geometries/x_dimension_test.rb
vedeu-0.6.67 test/lib/vedeu/geometries/x_dimension_test.rb
vedeu-0.6.66 test/lib/vedeu/geometries/x_dimension_test.rb
vedeu-0.6.65 test/lib/vedeu/geometries/x_dimension_test.rb
vedeu-0.6.64 test/lib/vedeu/geometries/x_dimension_test.rb
vedeu-0.6.63 test/lib/vedeu/geometries/x_dimension_test.rb
vedeu-0.6.62 test/lib/vedeu/geometries/x_dimension_test.rb
vedeu-0.6.61 test/lib/vedeu/geometries/x_dimension_test.rb