hexorx/countries — pull request #114 by guyboertje (2013-11-01 14:00:11+00:00)
Title: refactor currency method - always return an object

The problem:

When creating data for specs, one often uses a random city. Using the city.country_iso we can get the country and its currency. Specs will fail when the currency method returns nil.

The solution:

Return a ISO4217::Currency based object set to the base_currency or a ISO3166::Country::CurrencyProxy based object.

===

__I am aware that this can break production systems that are checking for nil when they would need to check for the proxy class.__

Would it be better to include this change in another way, so that, for testing a user can do this in their Gemfile?

```ruby

gem "countries", ">= 0.9.3"
group :test do
gem "countries", ">= 0.9.3", require: "countries_fixtures"
end

```