spec/arbre/unit/element_spec.rb in arbre-1.0.0 vs spec/arbre/unit/element_spec.rb in arbre-1.0.1

- old
+ new

@@ -162,12 +162,25 @@ end describe "rendering to html" do + before { @separator = $, } + after { $, = @separator } + let(:collection){ element + "hello world" } + it "should render the children collection" do element.children.should_receive(:to_s).and_return("content") element.to_s.should == "content" + end + + it "should render collection when is set the default separator" do + $, = "_" + collection.to_s.should == "hello world" + end + + it "should render collection when is not set the default separator" do + collection.to_s.should == "hello world" end end describe "adding elements together" do