Sha256: a518b7f6357a139733b947cd0cfa3d669485ed672c6e603a82bbcf3889aa6436

Contents?: true

Size: 500 Bytes

Versions: 7

Compression:

Stored size: 500 Bytes

Contents

require 'helper'

describe Twitter::GeoFactory do

  describe '.new' do
    it 'generates a Point' do
      geo = Twitter::GeoFactory.new(:type => 'Point')
      expect(geo).to be_a Twitter::Geo::Point
    end
    it 'generates a Polygon' do
      geo = Twitter::GeoFactory.new(:type => 'Polygon')
      expect(geo).to be_a Twitter::Geo::Polygon
    end
    it 'raises an IndexError when type is not specified' do
      expect { Twitter::GeoFactory.new }.to raise_error IndexError
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
twitter-5.5.1 spec/twitter/geo_factory_spec.rb
twitter-5.5.0 spec/twitter/geo_factory_spec.rb
twitter-5.4.1 spec/twitter/geo_factory_spec.rb
twitter-5.4.0 spec/twitter/geo_factory_spec.rb
twitter-5.3.1 spec/twitter/geo_factory_spec.rb
twitter-5.3.0 spec/twitter/geo_factory_spec.rb
twitter-5.2.0 spec/twitter/geo_factory_spec.rb