spec/bbcoder_spec.rb in bbcoder-0.2.0 vs spec/bbcoder_spec.rb in bbcoder-1.0.0

- old
+ new

@@ -134,8 +134,22 @@ end it "should handle singular tags in non singular form" do "[p]I [sub]me[/sub] think [sub]thought[/sub]; therefore [sup]well[/sup] I am[/p]".bbcode_to_html.should == "<p>I <sub>me</sub> think <sub>thought</sub>; therefore <sup>well</sup> I am</p>" end + + it "should handle incorrect singular tags" do + "[img=image.exe]".bbcode_to_html.should == "[img=image.exe]" + end + end + + context "with bad matches" do + it "should handle an img tag match for content" do + "[img]image.exe[/img]".bbcode_to_html.should == "[img]image.exe[/img]" + end + + it "should handle an img tag match for meta" do + "[img=image.exe]".bbcode_to_html.should == "[img=image.exe]" + end end end