spec/lib/thinking_sphinx/excerpter_spec.rb in moneypools-thinking-sphinx-1.2.11 vs spec/lib/thinking_sphinx/excerpter_spec.rb in moneypools-thinking-sphinx-1.2.12
- old
+ new
@@ -38,9 +38,17 @@
end
@excerpter.big_name
end
+ it "should escape the text in the excerpt" do
+ @search.should_receive(:excerpt_for) do |string, model|
+ string.should == 'test "escaping" <characters>'
+ end
+
+ @excerpter.string_to_escape
+ end
+
it "should still raise an exception if no column or method exists" do
lambda {
@excerpter.foo
}.should raise_error(NoMethodError)
end