require 'spec/autorun' require 'spec/runner/formatter/text_mate_formatter' require File.dirname(__FILE__) + '/../../spec_helper' describe WDD::Utils::PrettyXml do it "works for string" do source = "Hello" pretty = WDD::Utils::PrettyXml.format(source) pretty.should == "\n\n\n Hello\n\n" end it "works for Nokogiri doc" do source = Nokogiri::HTML("Hello") pretty = WDD::Utils::PrettyXml.format(source) pretty.should == "\n\n\n Hello\n\n" end end