spec/html/escape_spec.rb in escape_utils-0.1.0 vs spec/html/escape_spec.rb in escape_utils-0.1.1
- old
+ new
@@ -1,26 +1,24 @@
# encoding: UTF-8
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
-describe EscapeUtils do
+describe EscapeUtils, "escape_html" do
it "should respond to escape_html" do
EscapeUtils.should respond_to(:escape_html)
end
- context "escape_html" do
- it "should escape a basic html tag" do
- EscapeUtils.escape_html("<some_tag/>").should eql("<some_tag/>")
- end
+ it "should escape a basic html tag" do
+ EscapeUtils.escape_html("<some_tag/>").should eql("<some_tag/>")
+ end
- it "should escape double-quotes" do
- EscapeUtils.escape_html("<some_tag some_attr=\"some value\"/>").should eql("<some_tag some_attr="some value"/>")
- end
+ it "should escape double-quotes" do
+ EscapeUtils.escape_html("<some_tag some_attr=\"some value\"/>").should eql("<some_tag some_attr="some value"/>")
+ end
- it "should escape single-quotes" do
- EscapeUtils.escape_html("<some_tag some_attr='some value'/>").should eql("<some_tag some_attr='some value'/>")
- end
+ it "should escape single-quotes" do
+ EscapeUtils.escape_html("<some_tag some_attr='some value'/>").should eql("<some_tag some_attr='some value'/>")
+ end
- it "should escape the & character" do
- EscapeUtils.escape_html("<b>Bourbon & Branch</b>").should eql("<b>Bourbon & Branch</b>")
- end
+ it "should escape the & character" do
+ EscapeUtils.escape_html("<b>Bourbon & Branch</b>").should eql("<b>Bourbon & Branch</b>")
end
end
\ No newline at end of file