Sha256: 940fecbf76c981b2a1a89ab87bc3ca6efaf64a88d249d1cafba532c32ffc0779

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

require "spec_helper"

describe Fixer do
  describe ".daily" do
    it "downloads daily rates" do
      rates = Fixer.daily

      rates.size.should eql 1
      rates.first.should be_a_snapshot
    end
  end

  describe ".ninety_days" do
    it "downloads rates for the past 90 days" do
      rates = Fixer.ninety_days

      # We should have more than 50 working days in a three-month period
      rates.size.should > 50
      rates.each do |rate|
        rate.should be_a_snapshot
      end
    end
  end

  it "downloads all rates since January 1st, 1999" do
    rates = Fixer.historical

    # We should have a lot of working days in history
    rates.size.should > 1000
    rates.each do |rate|
      rate.should be_a_snapshot
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fixer-0.4 spec/fixer_spec.rb