Permalink
Browse files

adding to spec

  • Loading branch information...
1 parent b648f35 commit ce66e1c410c75cedb4d2f9ed7e1ecad7ddd86aa2 Kabari Hendrick committed Jan 26, 2010
Showing with 4 additions and 5 deletions.
  1. +4 −5 spec/auto_excerpt_spec.rb
@@ -32,11 +32,10 @@
it "should limit sentences" do
text = html_excerpt({:sentences => 3})
- stripped_text(text).split(AutoExcerpt::PUNCTUATION_MARKS).length.should eql(3)
-
- text = heavy_excerpt({:sentences => 3})
- stripped_text(text).split(AutoExcerpt::PUNCTUATION_MARKS).length.should eql(3)
+ text.should == %{<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur...</p>}
+ # text = heavy_excerpt({:sentences => 3})
+ # text.should == %{<p>Alright&hellip;ok&hellip;that title is a bold faced lie. I don&rsquo;t give a damn about <acronym title="Cascading Style Sheets">CSS</acronym> validation! Being a designer for a living, you have to know when to ditch some of these &lsquo;web 2.0&rsquo; type fads...</p>}
end
it "should limit paragraphs" do
@@ -62,7 +61,7 @@
text = AutoExcerpt.new(t,{:characters => 270})
text.match(/(<(\/|)b>)/).captures.length.should eql(2)
end
-
+
end
describe AutoExcerpt, "when stripping HTML" do

0 comments on commit ce66e1c

Please sign in to comment.