Sha256: a2c81ad7db9121c03e0ed6e2cb2d35a1244e7a488ec81d5e025835c33139a349

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 Bytes

Contents

require 'spec_helper'

describe "Configuration" do

  describe "#default_currency=" do
    let(:existing_currency) { Money::Currency.new(:usd) }
    let(:new_currency) { Money::Currency.new(:inr) }

    before(:each) do       
      Money.default_currency = existing_currency
    end
    
    it "sets default currency" do
      expect { EasyRailsMoney.default_currency = new_currency }.
        to change { Money.default_currency }.
        from(existing_currency).
        to(new_currency)
    end

    it "reads default currency" do
      expect { EasyRailsMoney.default_currency = new_currency }.
        to change { EasyRailsMoney.default_currency }.
        from(existing_currency).
        to(new_currency)
    end
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
easy_rails_money-0.0.2 spec/configuration_spec.rb
easy_rails_money-0.0.1 spec/configuration_spec.rb