Sha256: efdc72d63db8a35003471d785f84df6695e64e2a48579f10362536f4e229014a
Contents?: true
Size: 702 Bytes
Versions: 2
Compression:
Stored size: 702 Bytes
Contents
require "spec_helper" describe Onebox::Preview do describe "#to_s" do it "returns some html if given a valid url" do fake("http://www.example.com", response("example.response")) 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" it "returns an empty string if the url is not valid" end describe "#engine" do it "returns an engine" do preview = described_class.new("http://www.example.com") expect(preview.send(:engine)).to be_a(Onebox::Engine) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
onebox-1.0.1 | spec/lib/onebox/preview_spec.rb |
onebox-1.0.0 | spec/lib/onebox/preview_spec.rb |