Sha256: 458fd2dc6091896782d368c28afd69b68b7c0b944c41420b04123c202fc57a85

Contents?: true

Size: 698 Bytes

Versions: 16

Compression:

Stored size: 698 Bytes

Contents

require 'helper'

describe Twitter::Configuration do

  describe "#photo_sizes" do
    it "returns a hash of sizes when photo_sizes is set" do
      photo_sizes = Twitter::Configuration.new(:photo_sizes => {:small => {:h => 226, :w => 340, :resize => 'fit'}, :large => {:h => 466, :w => 700, :resize => 'fit'}, :medium => {:h => 399, :w => 600, :resize => 'fit'}, :thumb => {:h => 150, :w => 150, :resize => 'crop'}}).photo_sizes
      expect(photo_sizes).to be_a Hash
      expect(photo_sizes[:small]).to be_a Twitter::Size
    end
    it "is empty when photo_sizes is not set" do
      photo_sizes = Twitter::Configuration.new.photo_sizes
      expect(photo_sizes).to be_empty
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
twitter-4.8.1 spec/twitter/configuration_spec.rb
twitter-4.8.0 spec/twitter/configuration_spec.rb
twitter-4.7.0 spec/twitter/configuration_spec.rb
twitter-4.6.2 spec/twitter/configuration_spec.rb
twitter-4.6.1 spec/twitter/configuration_spec.rb
twitter-4.6.0 spec/twitter/configuration_spec.rb
twitter-4.5.0 spec/twitter/configuration_spec.rb
twitter-4.4.4 spec/twitter/configuration_spec.rb
twitter-4.4.3 spec/twitter/configuration_spec.rb
twitter-4.4.2 spec/twitter/configuration_spec.rb
twitter-4.4.1 spec/twitter/configuration_spec.rb
twitter-4.4.0 spec/twitter/configuration_spec.rb
twitter-4.3.0 spec/twitter/configuration_spec.rb
twitter-4.2.0 spec/twitter/configuration_spec.rb
twitter-4.1.2 spec/twitter/configuration_spec.rb
twitter-4.1.1 spec/twitter/configuration_spec.rb