spec/groove-dl/downloader_spec.rb in groove-dl-0.2.0 vs spec/groove-dl/downloader_spec.rb in groove-dl-0.3.0
- old
+ new
@@ -102,13 +102,13 @@
'/tmp/got-test.mp3 already downloaded')
end
it 'should process response in gui mode' do
Dir.mkdir('/tmp')
- stub_const('Widgets::Download::List::Queue::COLUMN_PATH', 0)
- stub_const('Widgets::Download::List::Queue::COLUMN_PGBAR_VALUE', 1)
- stub_const('Widgets::Download::List::Queue::COLUMN_PGBAR_TEXT', 2)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PATH', 0)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PGBAR_VALUE', 1)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PGBAR_TEXT', 2)
iter = []
iter[0] = '/tmp/got-test.mp3'
response = double
allow(response).to receive(:[])
.with('content-length').and_return('15')
@@ -126,13 +126,13 @@
expect(File.read('/tmp/got-test.mp3')).to eq('somethingnested')
end
it 'should process response in gui mode and does not download twice' do
Dir.mkdir('/tmp')
- stub_const('Widgets::Download::List::Queue::COLUMN_PATH', 0)
- stub_const('Widgets::Download::List::Queue::COLUMN_PGBAR_VALUE', 1)
- stub_const('Widgets::Download::List::Queue::COLUMN_PGBAR_TEXT', 2)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PATH', 0)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PGBAR_VALUE', 1)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PGBAR_TEXT', 2)
iter = []
iter[0] = '/tmp/got-test.mp3'
response = double
allow(response).to receive(:[])
.with('content-length').and_return('15')
@@ -157,12 +157,12 @@
end
it 'should download in gui mode' do
@downloader.type = 'gui'
Dir.mkdir('/tmp')
- stub_const('Widgets::Download::List::Queue::COLUMN_PATH', 0)
- stub_const('Widgets::Download::List::Queue::COLUMN_PGBAR_VALUE', 1)
- stub_const('Widgets::Download::List::Queue::COLUMN_PGBAR_TEXT', 2)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PATH', 0)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PGBAR_VALUE', 1)
+ stub_const('Widgets::Download::QUEUE_COLUMN_PGBAR_TEXT', 2)
iter = []
iter[0] = '/tmp/got-test.mp3'
allow(@client).to receive(:get_stream_auth_by_songid)
.with(1).and_return({})