test/lib/vedeu/models/view/composition_test.rb in vedeu-0.3.2 vs test/lib/vedeu/models/view/composition_test.rb in vedeu-0.3.3
- old
+ new
@@ -2,13 +2,19 @@
module Vedeu
describe Composition do
- let(:described) { Vedeu::Composition }
- let(:instance) { described.new(interfaces) }
-
+ 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
@@ -16,19 +22,19 @@
described.build({}) do
# ...
end
}
- it { subject.must_be_instance_of(Composition) }
+ 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) }
- it { subject.instance_variable_get('@colour').must_equal(colour) }
- it { subject.instance_variable_get('@style').must_equal(style) }
+ it { subject.instance_variable_get('@colour').must_be_instance_of(Vedeu::Colour) }
+ it { subject.instance_variable_get('@style').must_be_instance_of(Vedeu::Style) }
end
describe '#inspect' do
subject { instance.inspect }