spec/reckon/app_spec.rb in reckon-0.3.1 vs spec/reckon/app_spec.rb in reckon-0.3.2

- old
+ new

@@ -1,8 +1,8 @@ #!/usr/bin/env ruby -require "./#{File.dirname(__FILE__)}/../spec_helper" +require "spec_helper" require 'rubygems' require 'reckon' Reckon::App.settings[:testing] = true @@ -10,10 +10,11 @@ before do @chase = Reckon::App.new(:string => CHASE_CSV) @some_other_bank = Reckon::App.new(:string => SOME_OTHER_CSV) @two_money_columns = Reckon::App.new(:string => TWO_MONEY_COLUMNS_BANK) @simple_csv = Reckon::App.new(:string => SIMPLE_CSV) + @german_date = Reckon::App.new(:string => GERMAN_DATE_EXAMPLE) end it "should be in testing mode" do @chase.settings[:testing].should be_true Reckon::App.settings[:testing].should be_true @@ -99,10 +100,13 @@ @chase.date_for(1).month.should == Time.parse("2009/12/24").month @chase.date_for(1).day.should == Time.parse("2009/12/24").day @some_other_bank.date_for(1).year.should == Time.parse("2010/12/24").year @some_other_bank.date_for(1).month.should == Time.parse("2010/12/24").month @some_other_bank.date_for(1).day.should == Time.parse("2010/12/24").day + @german_date.date_for(1).year.should == Time.parse("2009/12/24").year + @german_date.date_for(1).month.should == Time.parse("2009/12/24").month + @german_date.date_for(1).day.should == Time.parse("2009/12/24").day end end describe "description_for" do it "should return the combined fields that are not money for date fields" do @@ -172,7 +176,12 @@ 10-Nov-9,-123.12,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER MORTGAGE,0.00, 09-Nov-10,123.12,,,SALARY SALARY,NGHSKS46383BGDJKD FOO BAR,432.12, 04-Nov-11,-1234.00,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER SAV TO MECU,0.00, 04-Nov-9,1234.00,,,TRANSFER CREDIT INTERNET TRANSFER,INTERNET TRANSFER,1234.00, 28-Oct-10,-123.12,,,TRANSFER DEBIT INTERNET TRANSFER,INTERNET TRANSFER SAV TO MORTGAGE,0.00, + CSV + GERMAN_DATE_EXAMPLE = (<<-CSV).strip + 24.12.2009,Check - 0000000122,122,-$76.00,"","$1,750.06" + 24.12.2009,BLARG R SH 456930,"","",+$327.49,"$1,826.06" + 24.12.2009,Check - 0000000112,112,-$800.00,"","$1,498.57" CSV end