Sha256: 1194ec457a1dfdce3b89f45560c8ce99b0ada08b5967cf3f644c62fc5a2f2692
Contents?: true
Size: 914 Bytes
Versions: 4
Compression:
Stored size: 914 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Quandl::Format::Dataset do expected_errors = [ { file: 'invalid_data', error: /Date/ }, { file: 'unknown_attribute', error: /this_attribute_does_not_exist/ }, { file: 'mismatched_columns', error: /Expected 4 but found 5/ }, { file: 'mismatched_rows', error: /Expected 3 but found 4/ }, { file: 'invalid_yaml', error: /could not find expected ':'/ }, { file: 'missing_dashes', error: /Attribute parse error at line 28 column 1/ }, { file: 'missing_dashes', error: /Did you forget to delimit the meta data section/ }, ] # run each expectation expected_errors.each do |pair| it "#{pair[:file]}.qdf should error with #{pair[:error]}" do Quandl::Logger.should_receive(:error).at_least(:once).with(pair[:error]) Quandl::Format::Dataset.load( fixtures_data[pair[:file]] ) end end end
Version data entries
4 entries across 4 versions & 1 rubygems