Sha256: 310376f41232f8f7052eb1978798b4f5eafaf2b08e6dcc91bbe4070dbb5aa4ce
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
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 allow(instance).to receive(:id).and_return(id) allow(instance).to receive(:size).and_return(size) allow(instance).to receive(:duration).and_return(duration) allow(instance).to receive(:provider).and_return(provider) allow(instance).to receive(:embed_code).and_return(embed_code) end it { expect(action).to eq(result) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
link_thumbnailer-3.3.1 | spec/models/video_spec.rb |