# encoding: utf-8 require 'spec_helper' replace_string = "source_code: BLAKEHIL\ncode: SCRAPER_TEST_1394485290783983\nname: Untitled Dataset 2014-04-04 13:08:49\ndescription: This dataset has no description.\nprivate: false\nreference_url: \nfrequency: daily\n-\nDate,High,Low,Settle\n2014-03-11,9.958,11.0,13.92\n\n" describe "./bin/quandl replace" do let(:prefix){ "replace" } let(:command){ self.class.superclass.description } subject{ quandl( [prefix, command].flatten.join(" ") ) } context data_path("replace.qdf") do its(:stdout){ should match /OK|Created/ } its(:stderr){ should be_blank } end context "SCRAPER_TEST_1394485290783983" do let(:prefix){ "download" } its(:stdout){ should eq replace_string } end end