spec/spec_helper.rb in onebox-1.7.3 vs spec/spec_helper.rb in onebox-1.7.4

- old
+ new

@@ -24,14 +24,10 @@ let(:onebox) { @onebox } let(:html) { @html } let(:data) { @data } let(:link) { @link } - - def escaped_data(key) - CGI.escapeHTML(data[key]) - end end shared_examples_for "an engine" do it "responds to data" do expect(described_class.private_instance_methods).to include(:data) @@ -62,11 +58,11 @@ it "includes subname" do expect(html).to include(%|<aside class="onebox #{described_class.onebox_name}">|) end it "includes title" do - expect(html).to include(escaped_data(:title)) + expect(html).to include(data[:title]) end it "includes link" do expect(html).to include(%|class="link" href="#{data[:link]}|) end @@ -74,9 +70,9 @@ it "includes badge" do expect(html).to include(%|<strong class="name">#{data[:badge]}</strong>|) end it "includes domain" do - expect(html).to include(%|class="domain" href="#{escaped_data(:domain)}|) + expect(html).to include(%|class="domain" href="#{data[:domain]}|) end end end