Sha256: bb054dd3d250a5bd834f6663f0ab676d563b40861d332fcc102e3657eadd66f5

Contents?: true

Size: 530 Bytes

Versions: 12

Compression:

Stored size: 530 Bytes

Contents

require 'helper'

describe Twitter::GeoFactory do

  describe ".new" do
    it "generates a Point" do
      geo = Twitter::GeoFactory.fetch_or_new(:type => 'Point')
      expect(geo).to be_a Twitter::Geo::Point
    end
    it "generates a Polygon" do
      geo = Twitter::GeoFactory.fetch_or_new(:type => 'Polygon')
      expect(geo).to be_a Twitter::Geo::Polygon
    end
    it "raises an ArgumentError when type is not specified" do
      expect{Twitter::GeoFactory.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/geo_factory_spec.rb
twitter-4.8.0 spec/twitter/geo_factory_spec.rb
twitter-4.7.0 spec/twitter/geo_factory_spec.rb
twitter-4.6.2 spec/twitter/geo_factory_spec.rb
twitter-4.6.1 spec/twitter/geo_factory_spec.rb
twitter-4.6.0 spec/twitter/geo_factory_spec.rb
twitter-4.5.0 spec/twitter/geo_factory_spec.rb
twitter-4.4.4 spec/twitter/geo_factory_spec.rb
twitter-4.4.3 spec/twitter/geo_factory_spec.rb
twitter-4.4.2 spec/twitter/geo_factory_spec.rb
twitter-4.4.1 spec/twitter/geo_factory_spec.rb
twitter-4.4.0 spec/twitter/geo_factory_spec.rb