Sha256: 965533bccc4bb3b0bed66c7f7f9ed271113fb03d944224626adb1296819e3328
Contents?: true
Size: 928 Bytes
Versions: 3
Compression:
Stored size: 928 Bytes
Contents
# this is a generic parent class for sharing code describe FilmSnob::OembedProvider do describe "initialization" do let(:film) { FilmSnob::YouTube.new(url, options) } context "when you assure it the URL is a good match" do let(:url) { "https://www.youtube.com/watch?v=st21dIMaGMs" } let(:options) { { :matched => true } } it "can look up the title, but the URL better be related to this site" do VCR.use_cassette "youtube/continental breakfast" do expect(film.title).to include "Continental Breakfast" end end end context "when you do not assure it the URL is a good match" do let(:url) { "this just is not a YouTube URL" } let(:options) { {} } it "will yell at you" do expect { film.title }.to raise_error(FilmSnob::NotSupportedURLError, /can not handle/) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
film_snob-2.0.0 | spec/film_snob/oembed_provider_spec.rb |
film_snob-1.0.1 | spec/film_snob/oembed_provider_spec.rb |
film_snob-1.0.0 | spec/film_snob/oembed_provider_spec.rb |