spec/lib/onebox/preview_spec.rb in onebox-1.0.1 vs spec/lib/onebox/preview_spec.rb in onebox-1.1.0
- old
+ new
@@ -1,10 +1,12 @@
require "spec_helper"
describe Onebox::Preview do
+ before(:each) { Onebox.defaults.cache.clear }
+
describe "#to_s" do
it "returns some html if given a valid url" do
- fake("http://www.example.com", response("example.response"))
+ fake("http://www.example.com", response("example"))
preview = described_class.new("http://www.example.com")
expect(preview.to_s).to include("Example Domain 1")
end
it "returns an empty string if the resource is not found"
it "returns an empty string if the resource fails to load"