Sha256: e84d65b4ef586ea2759c9ce8e318c9c4a7d41e884797a32a9eba61d0bcf2ef82

Contents?: true

Size: 783 Bytes

Versions: 3

Compression:

Stored size: 783 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe Quandl::Format::Dataset do
  
  let(:attributes) { qdf_attributes }
  
  subject{ Quandl::Format::Dataset.new(attributes) }
  
  its(:code){ should eq 'DATASET_CODE_2' }
  its(:source_code){ should eq 'SOURCE_CODE' }
  its(:name){ should eq 'Test Dataset Name 2' }
  its(:description){ should eq "Here is a description with multiple lines.\n This is the second line." }
  its(:column_names){ should eq ['Date', 'Value', 'High', 'Low'] }
  its(:data){ should eq Quandl::Data.new([["2013-11-20", "9.99470588235294", "11.003235294117646", "14.00164705882353"], ["2013-11-19", "10.039388096885814", nil, "14.09718770934256"]]) }
  
  its(:attributes){ should eq attributes }
  
  its(:to_qdf){ should eq qdf_attributes_to_format }
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
quandl_format-0.1.2 spec/lib/quandl/format/dataset_spec.rb
quandl_format-0.1.1 spec/lib/quandl/format/dataset_spec.rb
quandl_format-0.1.0 spec/lib/quandl/format/dataset_spec.rb