countries_ru 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module CountriesRu
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/countries_ru.rb CHANGED
@@ -5,7 +5,7 @@ module CountriesRu
5
5
  Data = YAML.load_file(File.join(File.dirname(__FILE__), 'data', 'countries.yml')) || {}
6
6
 
7
7
  def method_missing(method_name, *args, &block)
8
- proxy_methods = [:[], :keys]
8
+ proxy_methods = [:[], :keys, :each]
9
9
  if proxy_methods.include? method_name
10
10
  Data.send method_name, *args
11
11
  end
@@ -5,7 +5,15 @@ describe CountriesRu do
5
5
  CountriesRu['AU'].should be_kind_of(Hash)
6
6
  end
7
7
 
8
- it "should return list of keys" do
9
- CountriesRu.keys.should be_kind_of(Array)
8
+ describe "#keys" do
9
+ it "should proxy to .keys of data hash" do
10
+ CountriesRu.keys.should be_kind_of(Array)
11
+ end
12
+ end
13
+
14
+ describe "#each" do
15
+ it "should proxy to .each of countries hash" do
16
+ CountriesRu.each.should be_kind_of(Enumerator)
17
+ end
10
18
  end
11
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: countries_ru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: