require 'spec_helper' describe HtmlHelper do describe "stripping html from a string" do it "strips tags" do helper.strip_html('
Hello world!
').should == "Hello world!" end it "removes nbsp and amp entities" do helper.strip_html('Hello world&&').should == 'Hello world&&' end it "returns nil for nil input" do helper.strip_html(nil).should be_nil end describe "line breaks" do it "adds two line breaks after heading tags" do helper.strip_html("foo
bar").should == "foo\n\nbar"; end it "adds two line breaks after div tags" do helper.strip_html("