Sha256: e66b9ab511f66da2b1ebe0e25d6518ec4eba7446b3a6db631dc90316d1753284
Contents?: true
Size: 767 Bytes
Versions: 4
Compression:
Stored size: 767 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Quandl::Data::Table do subject { Quandl::Data::Random.table( nils: false, rows: 4, columns: 4 ) } its(:to_csv){ should be_a String } its(:to_h){ should be_a Hash } its(:count){ should eq 4 } it "should parse csv" do Quandl::Data::Table.new(subject.to_csv).count.should eq 4 end it "should transform the data" do value = subject.first[1] subject.transform(:rdiff).first[1].should_not eq value end it "should collapse the data" do subject.collapse(:monthly).count.should eq 1 end it "should convert julian dates to dates" do subject.to_date.first.first.should be_a Date end it "should limit the data" do subject.limit(2).count.should eq 2 end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
quandl_data-0.0.12 | spec/quandl_data.rb |
quandl_data-0.0.11 | spec/quandl_data.rb |
quandl_data-0.0.10 | spec/quandl_data.rb |
quandl_data-0.0.9 | spec/quandl_data.rb |