Sha256: a0f18891da54a4845e4edddd437b26b1f7dee37d1996bf5815cebe28c8631e30
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
# encoding: utf-8 require 'spec_helper' describe Dataset do let(:dataset){ create(:dataset, source_code: "QUANDL_CLIENT_TEST_SOURCE", data: Quandl::Fabricate::Data::Table.rand( rows: 10, columns: 4 ) ) } describe "#data" do subject{ Dataset.find( dataset.id ).data } its(:count){ should eq 10 } end context "updated" do subject{ sleep(0.75) Dataset.find( dataset.id ) } describe "#data" do before(:each){ subject.data = Quandl::Fabricate::Data::Table.rand( rows: 12, columns: 4 ); subject.save } its(:updated_at){ should_not eq dataset.updated_at } its(:data){ should_not eq dataset.data } its(:refreshed_at){ should_not eq dataset.refreshed_at } end context "#column_spec" do before(:each){ subject.column_spec = "[0,[\"Date \\n\",{}],[\"Column 1 \",{}],[\"New Column Name \",{}]]"; subject.save } its(:updated_at){ should_not eq dataset.updated_at } its(:column_spec){ should_not eq dataset.column_spec } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quandl_client-0.1.17 | spec/lib/quandl/client/dataset/data_spec.rb |