spec/compositor/leaf_spec.rb in compositor-2.0.0 vs spec/compositor/leaf_spec.rb in compositor-2.0.1
- old
+ new
@@ -24,9 +24,19 @@
end
{a: "b"}.should == dsl.to_hash
end
+ describe 'when root is true' do
+ it 'returns full root' do
+ dsl = Compositor::DSL.create(context) do |dsl|
+ dsl.dsl_string root: true
+ end
+
+ { dsl_string: { a: "b" } }.should == dsl.to_hash
+ end
+ end
+
it "returns an instance of subclass" do
dsl = Compositor::DSL.create(context).dsl_string
dsl.should be_kind_of(DslStringCompositor)
end
end