Sha256: 7e481c858f23178008d4dba06969e28143be0e1e2a9b219f396a6eea45100823

Contents?: true

Size: 1.31 KB

Versions: 23

Compression:

Stored size: 1.31 KB

Contents

require 'test_helper'

module Vedeu

  module Geometry

    describe VerticalAlignment do

      let(:described) { Vedeu::Geometry::VerticalAlignment }
      let(:instance)  { described.new(_value) }
      let(:_value)    {}

      describe '.align' do
        subject { described.align(_value) }

        context 'when the value is :none' do
          let(:_value) { :none }

          it { subject.must_equal(:none) }
        end

        context 'when the value is nil' do
          it { subject.must_equal(:none) }
        end

        context 'when the value is not a Symbol' do
          let(:_value) { 'invalid' }

          it { subject.must_equal(:none) }
        end

        context 'when the value is :bottom' do
          let(:_value) { :bottom }

          it { subject.must_equal(:bottom) }
        end

        context 'when the value is :middle' do
          let(:_value) { :middle }

          it { subject.must_equal(:middle) }
        end

        context 'when the value is :top' do
          let(:_value) { :top }

          it { subject.must_equal(:top) }
        end

        context 'when the value is :align_invalid' do
          let(:_value) { :align_invalid }

          it { proc { subject }.must_raise(Vedeu::Error::InvalidSyntax) }
        end
      end

    end # VerticalAlignment

  end # Geometry

end # Vedeu

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
vedeu-0.6.60 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.59 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.58 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.57 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.56 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.54 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.53 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.52 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.51 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.50 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.49 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.48 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.47 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.46 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.45 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.44 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.43 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.42 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.41 test/lib/vedeu/geometry/vertical_alignment_test.rb
vedeu-0.6.40 test/lib/vedeu/geometry/vertical_alignment_test.rb