Fix 3 more specs from ResultSet subclass change. - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit f7ade972fb3806796efeb8bdbf581019f15ce59c
(DIR) parent 9bd4451d4420cd09a74d7e857f3b6856e45cd8b3
(HTM) Author: Dieter Komendera <dieter@komendera.com>
Date: Wed, 1 Feb 2012 11:35:58 +0100
Fix 3 more specs from ResultSet subclass change.
Diffstat:
M spec/classes/report_cache_spec.rb | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/spec/classes/report_cache_spec.rb b/spec/classes/report_cache_spec.rb
@@ -346,16 +346,17 @@ describe Saulabs::Reportable::ReportCache do
it 'should return an array of arrays of Dates and Floats' do
result = Saulabs::Reportable::ReportCache.send(:prepare_result, @new_data, [], @report, @report.options)
- result.should be_kind_of(Array)
- result[0].should be_kind_of(Array)
- result[0][0].should be_kind_of(Date)
- result[0][1].should be_kind_of(Float)
+ result.should be_kind_of(Saulabs::Reportable::ResultSet)
+ result.to_a.should be_kind_of(Array)
+ result.to_a[0].should be_kind_of(Array)
+ result.to_a[0][0].should be_kind_of(Date)
+ result.to_a[0][1].should be_kind_of(Float)
end
describe 'with :live_data = false' do
before do
- @result = Saulabs::Reportable::ReportCache.send(:prepare_result, @new_data, [], @report, @report.options)
+ @result = Saulabs::Reportable::ReportCache.send(:prepare_result, @new_data, [], @report, @report.options).to_a
end
it 'should return an array of length :limit' do