spec/ruhl_spec.rb in ruhl-0.13.0 vs spec/ruhl_spec.rb in ruhl-0.14.0

- old
+ new

@@ -350,16 +350,28 @@ @doc = create_doc end it "will convert entities" do ps = @doc.xpath("/html/body/p") - ps[0].inner_html.should =~ /^Here is a space&nbsp;and another&nbsp;one.$/ - ps[1].inner_html.should == "RuHL &copy; 2009" + ps[0].inner_html.should == "Here is a space and another one." + ps[1].inner_html.should == "RuHL © 2009" # To verify everything is correct, I did it the old fashioned way # File.open('test.html',"w") do |f| # f << @doc.to_s # end + end + end + + describe "swap.html" do + before do + @html = File.read html(:swap) + @doc = create_doc + end + + it "will convert entities" do + ps = @doc.xpath("/html/body/p") + ps.inner_html.should == "The programming language, Ruby, is awesome." end end describe "when no method" do before do