spec/zemanta/enhancer_spec.rb in zemanta_client-0.0.4 vs spec/zemanta/enhancer_spec.rb in zemanta_client-0.0.5

- old
+ new

@@ -11,7 +11,16 @@ it "converts keywords to links" do stub_zemanta_enhancer! Zemanta::Enhancer.new(input).enhance.scan('<a').should have(2).elements end + + describe "no_duplicates option" do + it "doesn't use the same link multiple times" do + stub_zemanta_enhancer! + input = "I like Machu Pichu. Machu Pichu? Yeah, Machu Pichu" + output = Zemanta::Enhancer.new(input, no_duplicates: true).enhance + output.scan('<a').should have(1).elements + end + end end -end \ No newline at end of file +end