spec/lib/onebox/engine/wikipedia_onebox_spec.rb in onebox-1.1.0 vs spec/lib/onebox/engine/wikipedia_onebox_spec.rb in onebox-1.2.0

- old
+ new

@@ -1,33 +1,20 @@ require "spec_helper" describe Onebox::Engine::WikipediaOnebox do before(:all) do @link = "http://en.wikipedia.org/wiki/Kevin_Bacon" - fake(@link, response(described_class.template_name)) end - before(:each) { Onebox.defaults.cache.clear } - let(:link) { @link } - + include_context "engines" it_behaves_like "an engine" describe "#to_html" do - let(:html) { described_class.new(link).to_html } - - it "returns the product URL" do - expect(html).to include(link) - end - - it "returns the article title" do - expect(html).to include("Kevin Bacon") - end - - it "returns the article img src" do + it "includes article image" do expect(html).to include("225px-Kevin_Bacon_Comic-Con_2012.jpg") end - it "returns the article summary" do - expect(html).to include("Kevin Norwood Bacon[1] (born July 8, 1958)") + it "includes summary" do + expect(html).to include("Kevin Norwood Bacon (born July 8, 1958)") end end end