Skip to content

Commit

Permalink
Running flac2mp3 in silent mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
ymendel committed Jun 30, 2008
1 parent 3c75f61 commit 6aa13c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/conversion_observer/consumer.rb
Expand Up @@ -10,7 +10,7 @@ def run
end

def convert(file)
system('flac2mp3', '--delete', file)
system('flac2mp3', file, '--delete', '--silent')
end
end
end
9 changes: 7 additions & 2 deletions spec/consumer_spec.rb
Expand Up @@ -67,12 +67,17 @@
end

it 'should call the flac2mp3 command on the file' do
@consumer.expects(:system).with('flac2mp3', anything, @file)
@consumer.expects(:system).with('flac2mp3', @file, anything, anything)
@consumer.convert(@file)
end

it 'should pass the --delete flag to flac2mp3' do
@consumer.expects(:system).with('flac2mp3', '--delete', anything)
@consumer.expects(:system).with('flac2mp3', anything, '--delete', anything)
@consumer.convert(@file)
end

it 'should pass the --silent flag to flac2mp3' do
@consumer.expects(:system).with('flac2mp3', anything, anything, '--silent')
@consumer.convert(@file)
end
end
Expand Down

0 comments on commit 6aa13c5

Please sign in to comment.