fixer 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fixer/cache.rb CHANGED
@@ -42,7 +42,7 @@ module Fixer
42
42
 
43
43
  def quote(counter)
44
44
  rate = rates.detect { |rate| rate[:currency] == counter }
45
- raise(Error, "Currency not valid") if rate.nil?
45
+ raise(Error, "#{counter} not a valid currency") if rate.nil?
46
46
  rate[:rate].to_f
47
47
  end
48
48
  end
data/lib/fixer/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Fixer
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
@@ -68,13 +68,13 @@ module Fixer
68
68
 
69
69
  it "raises an error if counter currency not valid" do
70
70
  cache.instance_variable_set(:@rates, mock_rates)
71
- lambda { cache.to_foo }.should raise_error Fixer::Error, "Currency not valid"
71
+ lambda { cache.to_foo }.should raise_error Fixer::Error, "FOO not a valid currency"
72
72
  end
73
73
 
74
74
  it "raises an error if base currency not valid" do
75
75
  cache.instance_variable_set(:@rates, mock_rates)
76
- cache.base = "FOO"
77
- lambda { cache.to_usd }.should raise_error Fixer::Error, "Currency not valid"
76
+ cache.base = "BAR"
77
+ lambda { cache.to_usd }.should raise_error Fixer::Error, "BAR not a valid currency"
78
78
  end
79
79
  end
80
80
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Hakan Ensari