Sha256: dae28f870dc8849b4084842586485cb318fa5f968d43e31fb45b2b9dfe4ff4fc

Contents?: true

Size: 399 Bytes

Versions: 12

Compression:

Stored size: 399 Bytes

Contents

require 'helper'

describe Twitter::MediaFactory do

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

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
twitter-4.8.1 spec/twitter/media_factory_spec.rb
twitter-4.8.0 spec/twitter/media_factory_spec.rb
twitter-4.7.0 spec/twitter/media_factory_spec.rb
twitter-4.6.2 spec/twitter/media_factory_spec.rb
twitter-4.6.1 spec/twitter/media_factory_spec.rb
twitter-4.6.0 spec/twitter/media_factory_spec.rb
twitter-4.5.0 spec/twitter/media_factory_spec.rb
twitter-4.4.4 spec/twitter/media_factory_spec.rb
twitter-4.4.3 spec/twitter/media_factory_spec.rb
twitter-4.4.2 spec/twitter/media_factory_spec.rb
twitter-4.4.1 spec/twitter/media_factory_spec.rb
twitter-4.4.0 spec/twitter/media_factory_spec.rb