Sha256: 3816013f2a28a86cf05c1e9d4e8ef51eb86bfdcbf4ffd256e80285d084961f5d
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
require 'test_helper' module Vedeu module Views describe Composition do let(:described) { Vedeu::Views::Composition } let(:instance) { described.new(attributes) } let(:attributes) { { views: views, colour: colour, style: style, } } let(:views) { [] } let(:colour) {} let(:style) {} describe '.build' do subject { described.build({}) do # ... end } it { subject.must_be_instance_of(described) } end describe '#initialize' do it { instance.must_be_instance_of(described) } it { instance.instance_variable_get('@views').must_equal(views) } end describe '#add' do let(:child) { Vedeu::Views::View.new } subject { instance.add(child) } it { subject.must_be_instance_of(Vedeu::Views::ViewCollection) } end describe '#views' do subject { instance.views } it { subject.must_be_instance_of(Vedeu::Views::ViewCollection) } end describe '#parent' do subject { instance.parent } it { subject.must_be_instance_of(NilClass) } end end # Composition end # Views end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.5.5 | test/lib/vedeu/models/views/composition_test.rb |