Sha256: 983c32984d79810942bf0aeb14e90e0b9a322e1ca07e05b2f46dc75905d756f6

Contents?: true

Size: 881 Bytes

Versions: 7

Compression:

Stored size: 881 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe Quandl::Format::Dataset do
  
  let(:file){ self.class.superclass.description }
  subject{ Quandl::Format::Dataset.load( fixtures_data[file] ).first }
  
  context "invalid_data" do
    before(:each){ subject.valid? }
    its(:valid?){ should be_false }
    its('errors.messages'){ should eq({ data: ["Invalid date segments. Expected yyyy-mm-dd received 'Date'"] }) }
  end
  
  context "invalid_date" do
    before(:each){ subject.valid? }
    its(:valid?){ should be_false }
    
    its('errors.messages'){ should eq({ data: ["Invalid date 'ASDF'"] }) }
    its('client.valid?'){ should be_false }
    its('client.errors.messages'){ should eq({ data: ["Invalid date 'ASDF'"] }) }
    its('client.data.valid?'){ should be_false }
    its('client.data.errors.messages'){ should eq({ data: ["Invalid date 'ASDF'"] }) }
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
quandl_format-0.5.1 spec/lib/quandl/format/dataset/load/validation_spec.rb
quandl_format-0.5.0 spec/lib/quandl/format/dataset/load/validation_spec.rb
quandl_format-0.4.3 spec/lib/quandl/format/dataset/load/validation_spec.rb
quandl_format-0.4.2 spec/lib/quandl/format/dataset/load/validation_spec.rb
quandl_format-0.4.1 spec/lib/quandl/format/dataset/load/validation_spec.rb
quandl_format-0.4.0 spec/lib/quandl/format/dataset/load/validation_spec.rb
quandl_format-0.3.0 spec/lib/quandl/format/dataset/load/validation_spec.rb