Permalink
Browse files

Added test for last_updated

  • Loading branch information...
1 parent 209b7c0 commit c2c6f06e284e51db86fb4a4b80817eebdadedfad @jeisen jeisen committed Jan 10, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 spec/eu_central_bank_spec.rb
View
11 spec/eu_central_bank_spec.rb
@@ -48,6 +48,17 @@
@bank.get_rate("EUR", currency).should > 0
end
end
+
+ it 'should set last_updated when the rates are downloaded' do
+ lu1 = @bank.last_updated
+ @bank.update_rates(@cache_path)
+ lu2 = @bank.last_updated
+ @bank.update_rates(@cache_path)
+ lu3 = @bank.last_updated
+
+ lu1.should_not eq(lu2)
+ lu2.should_not eq(lu3)
+ end
it "should return the correct exchange rates using exchange" do
@bank.update_rates(@cache_path)

0 comments on commit c2c6f06

Please sign in to comment.