diff --git a/nbrb_currency.gemspec b/nbrb_currency.gemspec index d7bf832..2cc9cbf 100644 --- a/nbrb_currency.gemspec +++ b/nbrb_currency.gemspec @@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__) Gem::Specification.new do |s| s.name = "nbrb_currency" - s.version = "1.0.0" + s.version = "1.0.1" s.platform = Gem::Platform::RUBY s.authors = ["Aleks Grebennik"] s.email = ["aleks.grebennik@gmail.com"] @@ -14,7 +14,7 @@ Gem::Specification.new do |s| s.required_rubygems_version = ">= 1.3.6" s.add_dependency "nokogiri" - s.add_dependency "money", "~> 3.7.1" + s.add_dependency "money", "~> 4.0.1" s.add_development_dependency "rspec", ">= 2.0.0" s.add_development_dependency "rr" diff --git a/spec/nbrb_currency_spec.rb b/spec/nbrb_currency_spec.rb index 7a5a932..0b24d79 100644 --- a/spec/nbrb_currency_spec.rb +++ b/spec/nbrb_currency_spec.rb @@ -48,7 +48,7 @@ subunit = Money::Currency.wrap("KWD").subunit_to_unit.to_f @bank.exchange(1000, "KWD", "BYR").cents.should == ((subunit / 1000) * @exchange_rates["currencies"]['KWD'].to_f * 100).round subunit = Money::Currency.wrap("JPY").subunit_to_unit.to_f - @bank.exchange(100, "JPY", "BYR").cents.should == ((subunit / 100) * @exchange_rates["currencies"]['JPY'].to_f * 100).round + @bank.exchange(100, "JPY", "BYR").cents.should == ((subunit * 100) * @exchange_rates["currencies"]['JPY'].to_f * 100).round end it "should return the correct exchange rates using exchange_with" do