Sha256: ff2dca377a7b6dbda49f2581cd55288db2fae48c96acc0661e1f66691bc07a40

Contents?: true

Size: 657 Bytes

Versions: 3

Compression:

Stored size: 657 Bytes

Contents

require "spec_helper"

describe Onebox::Matcher do
  describe "#oneboxed" do
    it "returns Example onebox when given example url" do
      matcher = described_class.new("http://example.com")
      expect(matcher.oneboxed).to be(Onebox::Engine::ExampleOnebox)
    end

    it "returns Amazon onebox when given amazon url" do
      matcher = described_class.new("http://amazon.com")
      expect(matcher.oneboxed).to be(Onebox::Engine::AmazonOnebox)
    end

    it "returns Flickr onebox when given flickr url" do
      matcher = described_class.new("http://flickr.com")
      expect(matcher.oneboxed).to be(Onebox::Engine::FlickrOnebox)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
onebox-1.1.0 spec/lib/onebox/matcher_spec.rb
onebox-1.0.1 spec/lib/onebox/matcher_spec.rb
onebox-1.0.0 spec/lib/onebox/matcher_spec.rb