Sha256: 2f7589643ac1066094020e7b2568ba176d65e8a0f94fa9a2cc2f7c4019fc6c22

Contents?: true

Size: 1.18 KB

Versions: 25

Compression:

Stored size: 1.18 KB

Contents

require 'test_helper'

module Vedeu

  describe Composition do

    let(:described)  { Vedeu::Composition }
    let(:instance)   { described.new(attributes) }
    let(:attributes) {
      {
        interfaces: interfaces,
        colour:     colour,
        style:      style,
      }
    }
    let(:interfaces) { [] }
    let(:colour)     {}
    let(:style)      {}

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

      it { subject.must_be_instance_of(described) }
    end

    describe '#initialize' do
      subject { instance }

      it { subject.must_be_instance_of(described) }
      it { subject.instance_variable_get('@interfaces').must_equal(interfaces) }
    end

    describe '#add' do
      let(:child) { Vedeu::Interface.new }

      subject { instance.add(child) }

      it { subject.must_be_instance_of(Vedeu::Interfaces) }
    end

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

      it { subject.must_be_instance_of(Vedeu::Interfaces) }
    end

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

      it { subject.must_be_instance_of(NilClass) }
    end

  end # Composition

end # Vedeu

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
vedeu-0.4.40 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.39 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.38 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.37 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.36 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.35 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.34 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.33 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.32 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.31 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.30 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.29 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.28 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.27 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.26 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.25 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.24 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.23 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.22 test/lib/vedeu/models/composition_test.rb
vedeu-0.4.21 test/lib/vedeu/models/composition_test.rb