Sha256: c74fb1c3a645b9b247b5852e5ced53c014bfb0d92169c8330bbe685c1d706959

Contents?: true

Size: 520 Bytes

Versions: 9

Compression:

Stored size: 520 Bytes

Contents

require 'spec_helper'

describe "configuration" do

  describe "initializer" do

    it "sets default currency" do
      Money.default_currency.should == Money::Currency.new(:eur)
    end

    it "registers a custom currency" do
      Money::Currency.table.should include(:eu4)
    end

    it "adds exchange rates given in config initializer" do
      Money.us_dollar(100).exchange_to("CAD").should == Money.new(124, "CAD")
      Money.ca_dollar(100).exchange_to("USD").should == Money.new(80, "USD")
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
money-rails-0.7.1 spec/configuration_spec.rb
money-rails-0.7.0 spec/configuration_spec.rb
money-rails-0.7.0.pre1 spec/configuration_spec.rb
stocktrade-money-rails-0.6.0 spec/configuration_spec.rb
money-rails-0.6.0 spec/configuration_spec.rb
money-rails-0.5.0 spec/configuration_spec.rb
money-rails-0.4.0 spec/configuration_spec.rb
money-rails-0.3.1 spec/configuration_spec.rb
money-rails-0.3.0 spec/configuration_spec.rb