Sha256: 40680c5a654c33cfe228d651a5dee6985e2ac9eed373a97e8501ab776c034cf5

Contents?: true

Size: 1.41 KB

Versions: 22

Compression:

Stored size: 1.41 KB

Contents

require 'test_helper'

module Vedeu

  module DSL

    describe View do

      let(:described) { Vedeu::DSL::View }

      describe '.interface' do
        subject {
          described.interface('flourine') do
            # ...
          end
        }

        it { subject.must_be_instance_of(Vedeu::Interface) }

        context 'when the block is not given' do
          subject { described.interface }

          it { proc { subject }.must_raise(InvalidSyntax) }
        end

        context 'when the name was not set' do
          subject {
            described.interface('') do
              # ...
            end
          }

          it { proc { subject }.must_raise(MissingRequired) }
        end
      end

      describe '.renders' do
        subject {
          described.renders do
            # ...
          end
        }

        it { subject.must_be_instance_of(Array) }

        context 'when the block is not given' do
          subject { described.renders }

          it { proc { subject }.must_raise(InvalidSyntax) }
        end
      end

      describe '.views' do
        subject {
          described.views do
            # ...
          end
        }

        it { subject.must_be_instance_of(Array) }

        context 'when the block is not given' do
          subject { described.views }

          it { proc { subject }.must_raise(InvalidSyntax) }
        end
      end

    end # View

  end # DSL

end # Vedeu

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
vedeu-0.4.15 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.14 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.13 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.12 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.11 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.10 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.9 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.8 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.7 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.6 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.5 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.4 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.3 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.2 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.1 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.0 test/lib/vedeu/dsl/view_test.rb
vedeu-0.3.5 test/lib/vedeu/dsl/view_test.rb
vedeu-0.3.4 test/lib/vedeu/dsl/view_test.rb
vedeu-0.3.3 test/lib/vedeu/dsl/view_test.rb
vedeu-0.3.2 test/lib/vedeu/dsl/view_test.rb