spec/currency_plugin/model_spec.rb in killbill-currency-plugin-1.3.1 vs spec/currency_plugin/model_spec.rb in killbill-currency-plugin-2.0.0

- old
+ new

@@ -36,11 +36,10 @@ Killbill::CurrencyPlugin::CurrencyUpdate.create :base_currency => 'EUR', :conversion_date => d3 Killbill::CurrencyPlugin::CurrencyUpdate.create :base_currency => 'BRL', :conversion_date => d3 - eur_historical = Killbill::CurrencyPlugin::CurrencyUpdate.historical_base_currencies('EUR') eur_historical.size.should == 3 Time.at(eur_historical[0].conversion_date).should == Time.at(d2) Time.at(eur_historical[1].conversion_date).should == Time.at(d3) Time.at(eur_historical[2].conversion_date).should == Time.at(d1) @@ -49,11 +48,11 @@ eur_latest.size.should == 1 eur_latest[0].base_currency.should == 'EUR' Time.at(eur_latest[0].conversion_date).should == Time.at(d2) distinct_base_currencies = Killbill::CurrencyPlugin::CurrencyUpdate.distinct_base_currencies - distinct_base_currencies.size.should == 3 + distinct_base_currencies.count.should == 3 distinct_base_currencies.each_with_index do |c, i| c.base_currency.should == 'BRL' if i == 0 c.base_currency.should == 'EUR' if i == 1 c.base_currency.should == 'USD' if i == 2 end @@ -110,6 +109,6 @@ latest_rates_for_usd[1].target_currency.should == 'EUR' latest_rates_for_usd[1].rate.should == 1.38055 latest_rates_for_usd[2].target_currency.should == 'GBP' latest_rates_for_usd[2].rate.should == 1.61660 end -end \ No newline at end of file +end