Sha256: 3a7d801ebefcef6fad49f3ea4e234105afa41da3e3f12c56bd0e29fc5c5c79b0

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

# encoding: utf-8
require 'spec_helper'
require 'open3'

describe "./bin/quandl schedule" do

  let(:command){ self.class.superclass.description }
  subject{ quandl("schedule #{command}") }
  
  context "delete spec/fixtures/scraper.rb" do
    its(:stdout){ should match 'Not Found' }
  end
  
  context "add spec/fixtures/scraper.rb" do
    # first upload
    its(:stdout){ should match 'Created' }
    # second upload
    its(:stdout){ should match 'name: has already been taken' }
  end
  
  context "list" do
    its(:stdout){ should match 'scraper.rb' }
  end
  
  context "show scraper.rb --output-format json" do
    its(:stdout){ should match 'scraper_url' }
  end
  
  context "show scraper.rb -C 0" do
    its(:stdout){ should eq "OK\n" }
  end
  
  context "show scraper.rb -C 1" do
    its(:stdout){ should eq "scraper.rb\n" }
  end
  
  context "show scraper.rb -C 2" do
    its(:stdout){ should eq "Scraper::Script\n" }
  end
  
  context "show scraper.rb --output-column 2" do
    its(:stdout){ should eq "Scraper::Script\n" }
  end
  
  context "show scraper.rb --output-column 4" do
    its(:stdout){ should match 's3.amazonaws' }
  end
  
  context "delete spec/fixtures/scraper.rb" do
    its(:stdout){ should match 'OK' }
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quandl-0.3.0 spec/lib/quandl/command/schedule_spec.rb