jam-cloud/ruby/spec/jam_ruby/resque/audiomixer_spec.rb

31 lines
926 B
Ruby

require 'spec_helper'
# these tests avoid the use of ActiveRecord and FactoryGirl to do blackbox, non test-instrumented tests
describe AudioMixer do
let(:audiomixer) { AudioMixer.new }
describe "validate" do
it "no files specified" do
expect{ audiomixer.run({}) }.to raise_error("no files specified")
end
it "no codec specified" do
expect{ audiomixer.run({ "files" => [ {"offset" => 0, "filename" => "/some/path"} ] }) }.to raise_error("no codec specified")
end
it "no offset specified" do
expect{ audiomixer.run({ "files" => [ {"codec" => "vorbis", "filename" => "/some/path"} ] }) }.to raise_error("no offset specified")
end
it "no output specified" do
expect{ audiomixer.run({ "files" => [ {"codec" => "vorbis", "offset" => 0, "filename" => "/some/path"} ] }) }.to raise_error("no output specified")
end
end
describe "fetch_audio_files" do
end
end