Sha256: e809f2d41e39c8e2b40458cc05f822053841cc9760966dfd2605de5acfd0d205

Contents?: true

Size: 1.53 KB

Versions: 13

Compression:

Stored size: 1.53 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

        context 'when the block is given' do
        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

        context 'when the block is given' do
        end
      end

    end # View

  end # DSL

end # Vedeu

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vedeu-0.4.28 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.27 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.26 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.25 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.24 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.23 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.22 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.21 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.20 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.19 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.18 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.17 test/lib/vedeu/dsl/view_test.rb
vedeu-0.4.16 test/lib/vedeu/dsl/view_test.rb