Sha256: 45aafda25a31ccea4900014b870d346eef36fa29c78f15acbb1e1c9522badbb9

Contents?: true

Size: 379 Bytes

Versions: 7

Compression:

Stored size: 379 Bytes

Contents

require 'helper'

describe Twitter::MediaFactory do

  describe '.new' do
    it 'generates a Photo' do
      media = Twitter::MediaFactory.new(:id => 1, :type => 'photo')
      expect(media).to be_a Twitter::Media::Photo
    end
    it 'raises an IndexError when type is not specified' do
      expect { Twitter::MediaFactory.new }.to raise_error(IndexError)
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
twitter-5.11.0 spec/twitter/media_factory_spec.rb
twitter-5.10.0 spec/twitter/media_factory_spec.rb
twitter-5.9.0 spec/twitter/media_factory_spec.rb
twitter-5.8.0 spec/twitter/media_factory_spec.rb
twitter-5.7.1 spec/twitter/media_factory_spec.rb
twitter-5.7.0 spec/twitter/media_factory_spec.rb
twitter-5.6.0 spec/twitter/media_factory_spec.rb