Sha256: b21248984db3bad4dd4a0ce15c90047e748ee066f3589d0ea28843d5949c8e24
Contents?: true
Size: 1.48 KB
Versions: 10
Compression:
Stored size: 1.48 KB
Contents
# encoding: utf-8 require 'spec_helper' describe Quandl::Command::Tasks::Download do def self.it_should_download(code, options={}) it "should download #{code}, #{options}" do Quandl::Logger.should_receive(:info).with(/code: #{code}/) Quandl::Command::Tasks::Download.call( code, options ) end end context "spec/fixtures/data/datasets.qdf" do before(:all){ Quandl::Command::Tasks::Upload.call( 'spec/fixtures/data/datasets.qdf' ) } it_should_download 'TEST_1' it_should_download 'TEST_2' it_should_download 'TEST_4', column: 2 it_should_download 'TEST_4', order: 'asc' it_should_download 'TEST_4', order: 'desc' it_should_download 'TEST_4', limit: 10 it_should_download 'TEST_4', row: 10 it_should_download 'TEST_4', offset: 10 # test each transformation Quandl::Operation::Transform.valid_transformations.each{|v| it_should_download('TEST_4', transformation: v.to_s ) } # test each collapse Quandl::Operation::Collapse.valid_collapses.each{|v| it_should_download('TEST_4', collapse: v.to_s ) } after(:all){ Quandl::Format::Dataset.load_from_file('spec/fixtures/data/datasets.qdf').each{|d| Quandl::Command::Tasks::Delete.call( d.code, force_yes: true ) } } end end describe "./bin/quandl download" do let(:command){ self.class.superclass.description } subject{ quandl("download #{command}") } context "TEST_DOES_NOT_EXIST" do its(:stdout){ should be_blank } end end
Version data entries
10 entries across 10 versions & 1 rubygems