Sha256: c2ad634470967571b95100ee09f8d10c90637131843e62b253478f5cb255e744

Contents?: true

Size: 501 Bytes

Versions: 7

Compression:

Stored size: 501 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.11.0 spec/twitter/geo_factory_spec.rb
twitter-5.10.0 spec/twitter/geo_factory_spec.rb
twitter-5.9.0 spec/twitter/geo_factory_spec.rb
twitter-5.8.0 spec/twitter/geo_factory_spec.rb
twitter-5.7.1 spec/twitter/geo_factory_spec.rb
twitter-5.7.0 spec/twitter/geo_factory_spec.rb
twitter-5.6.0 spec/twitter/geo_factory_spec.rb