chiketto 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chiketto/address.rb +3 -1
- data/lib/chiketto/venue.rb +3 -5
- data/lib/chiketto/version.rb +1 -1
- data/test/address_test.rb +5 -1
- data/test/venue_test.rb +8 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 131a170fb06a5ed5d165c9991303144803a26ea8
|
4
|
+
data.tar.gz: 493b872900bbdeaa3cdb543882d21d5aaae0506d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22065b1be117ebaf4a42be8e96c00a64f23108ca8d5cdce71e0ae90f41a060f5946955d4413d5070562fbe864462f5f9a9f935c0c1d6be15dfbe7a1f8c9d3bee
|
7
|
+
data.tar.gz: 039b535a604e1f8f36e3bba78073adaeca13ca4160e025b4dc8732650580012adca92ccc917dfe4046dd54a336ed43eaf4f17b466d743748455e426ded6fb519
|
data/lib/chiketto/address.rb
CHANGED
data/lib/chiketto/venue.rb
CHANGED
data/lib/chiketto/version.rb
CHANGED
data/test/address_test.rb
CHANGED
@@ -7,7 +7,9 @@ class AddressTest < MiniTest::Test
|
|
7
7
|
'region' => 'CA',
|
8
8
|
'address_1' => '651 Brannan',
|
9
9
|
'address_2' => 'Suite 110',
|
10
|
-
'country_name' => 'United States'
|
10
|
+
'country_name' => 'United States',
|
11
|
+
'latitude' => '42.3618641',
|
12
|
+
'longitude' => '-71.0905626'
|
11
13
|
end
|
12
14
|
|
13
15
|
def test_responds_to_methods
|
@@ -17,6 +19,8 @@ class AddressTest < MiniTest::Test
|
|
17
19
|
assert_respond_to @address, :address_1
|
18
20
|
assert_respond_to @address, :address_2
|
19
21
|
assert_respond_to @address, :country_name
|
22
|
+
assert_respond_to @address, :longitude
|
23
|
+
assert_respond_to @address, :latitude
|
20
24
|
end
|
21
25
|
|
22
26
|
def test_responds_to_string_method
|
data/test/venue_test.rb
CHANGED
@@ -3,35 +3,33 @@ require 'test_helper'
|
|
3
3
|
class VenueTest < MiniTest::Test
|
4
4
|
def basic_venue
|
5
5
|
@venue = Chiketto::Venue.new 'id' => '545454',
|
6
|
-
'latitude' => '42.3618641',
|
7
|
-
'longitude' => '-71.0905626',
|
8
6
|
'name' => 'Eventbrite HQ'
|
9
7
|
end
|
10
8
|
|
11
9
|
def test_venue_methods_exist
|
12
10
|
@venue = Chiketto::Venue.new 'id' => '545454',
|
13
|
-
'
|
11
|
+
'location' => {
|
14
12
|
'city' => 'San Francisco',
|
15
13
|
'country' => 'US',
|
16
14
|
'region' => 'CA',
|
17
15
|
'address_1' => '651 Brannan',
|
18
16
|
'address_2' => 'Suite 110',
|
19
|
-
'country_name' => 'United States'
|
17
|
+
'country_name' => 'United States',
|
18
|
+
'latitude' => '42.3618641',
|
19
|
+
'longitude' => '-71.0905626',
|
20
20
|
},
|
21
|
-
'latitude' => '42.3618641',
|
22
|
-
'longitude' => '-71.0905626',
|
23
21
|
'name' => 'Eventbrite HQ'
|
24
22
|
|
25
23
|
assert_respond_to @venue, :id
|
26
|
-
assert_respond_to @venue, :
|
27
|
-
assert_respond_to @venue, :latitude
|
28
|
-
assert_respond_to @venue, :longitude
|
24
|
+
assert_respond_to @venue, :location
|
29
25
|
assert_respond_to @venue, :name
|
30
26
|
end
|
31
27
|
|
32
28
|
def test_venue_with_no_address
|
33
29
|
basic_venue
|
34
|
-
assert_respond_to @venue.
|
30
|
+
assert_respond_to @venue.location, :to_s
|
31
|
+
assert_respond_to @venue.location, :latitude
|
32
|
+
assert_respond_to @venue.location, :longitude
|
35
33
|
end
|
36
34
|
|
37
35
|
def test_venue_returns_name_for_to_s
|