Sha256: 5b4206fd5668a3fcc5940a0b0bdbc9c4d1feee99f550659455427238a5301f76
Contents?: true
Size: 1.13 KB
Versions: 4
Compression:
Stored size: 1.13 KB
Contents
require 'helper' describe Twitter::Geo::Point do before do @point = Twitter::Geo::Point.new(:coordinates => [-122.399983, 37.788299]) end describe "#==" do it "returns true for empty objects" do point = Twitter::Geo::Point.new other = Twitter::Geo::Point.new expect(point == other).to be true end it "returns true when objects coordinates are the same" do other = Twitter::Geo::Point.new(:coordinates => [-122.399983, 37.788299]) expect(@point == other).to be true end it "returns false when objects coordinates are different" do other = Twitter::Geo::Point.new(:coordinates => [37.788299, -122.399983]) expect(@point == other).to be false end it "returns false when classes are different" do other = Twitter::Geo.new(:coordinates => [-122.399983, 37.788299]) expect(@point == other).to be false end end describe "#latitude" do it "returns the latitude" do expect(@point.latitude).to eq(-122.399983) end end describe "#longitude" do it "returns the longitude" do expect(@point.longitude).to eq(37.788299) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
twitter-5.1.1 | spec/twitter/geo/point_spec.rb |
twitter-5.1.0 | spec/twitter/geo/point_spec.rb |
twitter-5.0.1 | spec/twitter/geo/point_spec.rb |
twitter-5.0.0 | spec/twitter/geo/point_spec.rb |