spec/lib/onebox/engine_spec.rb in onebox-1.5.17 vs spec/lib/onebox/engine_spec.rb in onebox-1.5.18

- old
+ new

@@ -16,10 +16,10 @@ { key: "value" } end end describe "#link" do - before { Onebox::View.any_instance.stub(:template) { %|this shold be a template| } } + before { allow(Onebox::View).to receive(:template) { %|this shold be a template| } } it "escapes `link`" do html = OneboxEngineExample.new(%|http://foo.com" onscript="alert('foo')|).to_html expect(html).not_to include(%|onscript="alert('foo')|) end