spec/groove-dl/cli_spec.rb in groove-dl-0.3.1 vs spec/groove-dl/cli_spec.rb in groove-dl-0.4.0
- old
+ new
@@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
require 'spec_helper'
require 'groove-dl/cli'
+require 'groove-dl/configuration'
require 'slop'
+require 'logger'
# Groove Dl tests
module GrooveDl
# CLI tests
module CLI
@@ -30,12 +32,14 @@
"Groove-dl v#{VERSION} on #{RUBY_DESCRIPTION}"
)
end
it 'should download playlist' do
+ allow_any_instance_of(Logger).to receive(:info)
allow(Grooveshark::Client).to receive(:new).and_return(true)
downloader = double
allow(downloader).to receive(:playlist).with(1).and_return(true)
+ allow(downloader).to receive(:output_directory).and_return('/tmp')
allow(Downloader).to receive(:new).and_return(downloader)
expect(CLI.options.parse %w( -p 1)).to eq(['-p', '1'])
end
it 'should do nothing if v option is passed' do