Sha256: 3d58f1e2445dddf85d21d95722078799db623c49f4434899e077b86584e188f4
Contents?: true
Size: 1.22 KB
Versions: 5
Compression:
Stored size: 1.22 KB
Contents
# encoding: utf-8 require 'spec_helper' describe "./bin/quandl delete" do let(:command){ self.class.superclass.description } subject{ quandl("delete #{command}") } context "DOES_NOT_EXIST" do its(:stdout){ should match 'Not Found' } end end describe Quandl::Command::Tasks::Delete do let(:subject_args){ [] } subject{ Quandl::Command::Tasks::Delete.call(*subject_args) } context "spec/fixtures/data/datasets.qdf" do before(:each){ Quandl::Command::Tasks::Upload.call( 'spec/fixtures/data/datasets.qdf' ) } it "should delete spec/fixtures/data/datasets.qdf" do TestOutput.should_receive(:info).with(/OK/).at_least(4).times datasets = Quandl::Format::Dataset.load_from_file('spec/fixtures/data/datasets.qdf') datasets.each{|d| Quandl::Command::Tasks::Delete.call( d.code, force_yes: true ) } end it "should not download" do datasets = Quandl::Format::Dataset.load_from_file('spec/fixtures/data/datasets.qdf') datasets.each{|d| Quandl::Command::Tasks::Delete.call( d.code, force_yes: true ) } TestOutput.should_receive(:info).with(nil).at_least(4).times datasets.each{|d| Quandl::Command::Tasks::Download.call( d.code ) } end end end
Version data entries
5 entries across 5 versions & 1 rubygems