Sha256: c6c77ac4d086b40e795f0bf0394f0f695c236273b19bb22ec2e8511ad4630474
Contents?: true
Size: 1021 Bytes
Versions: 23
Compression:
Stored size: 1021 Bytes
Contents
require 'spec_helper' describe LinkThumbnailer::Models::Video do let(:src) { 'http://foo.com/foo.swf' } let(:instance) { described_class.new(src) } describe '#to_s' do let(:action) { instance.to_s } it { expect(action).to eq(src) } end describe '#as_json' do let(:action) { instance.as_json } let(:id) { 1 } let(:size) { [1, 1] } let(:duration) { 10 } let(:provider) { 'foo' } let(:embed_code) { 'bar' } let(:result) { { id: id, src: src, size: size, duration: duration, provider: provider, embed_code: embed_code } } before do instance.stub(:id).and_return(id) instance.stub(:size).and_return(size) instance.stub(:duration).and_return(duration) instance.stub(:provider).and_return(provider) instance.stub(:embed_code).and_return(embed_code) end it { expect(action).to eq(result) } end end
Version data entries
23 entries across 23 versions & 1 rubygems