continents 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,7 @@ module Ravibhim
19
19
  const_set("#{cont_const_name}_COUNTRIES", countries)
20
20
  end
21
21
 
22
+ COUNTRIES = COUNTRY_TO_CONTINENT.keys.sort
22
23
 
23
24
  def self.get_continent(country)
24
25
  COUNTRY_TO_CONTINENT[country]
@@ -58,6 +58,14 @@ describe "Continents" do
58
58
  end
59
59
  end
60
60
 
61
+ describe "COUNTRIES" do
62
+ it 'gets set to the list of countries' do
63
+ ['India', 'Australia', 'United States of America', 'France', 'Argentina', 'Nigeria' ].each do |c|
64
+ Ravibhim::Continents::COUNTRIES.should include(c)
65
+ end
66
+ end
67
+ end
68
+
61
69
  describe :get_country do
62
70
  it 'returns the continent given the country' do
63
71
  Ravibhim::Continents::get_continent('India').should == 'Asia'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ravi Bhim
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-07 00:00:00 -07:00
17
+ date: 2010-07-08 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency