Sha256: 87f4f39765a16bdf7b22b0b6b1e65ee42857ed5db847f78e376e3a998b2c4490

Contents?: true

Size: 899 Bytes

Versions: 34

Compression:

Stored size: 899 Bytes

Contents

require 'spec/helper'
require "fsr/app"
FSR::App.load_application("playback")

describe "Testing FSR::App::Playback" do
  it "Plays a file or stream" do
    playback = FSR::App::Playback.new("shout://scfire-ntc-aa01.stream.aol.com/stream/1035")
    playback.sendmsg.should == "call-command: execute\nexecute-app-name: playback\nexecute-app-arg: shout://scfire-ntc-aa01.stream.aol.com/stream/1035\nevent-lock:true\n\n"
  end

end

describe "Testing FSR::App::Playback - handling of non-existant files" do

  it "Raise if files specifed absolutely aren't present" do
    lambda { FSR::App::Playback.new("/path/non-existing.wav") }.
      should.raise(Errno::ENOENT)
  end

  it "Not raise if not an absolute file" do
    file_name = File.expand_path(__FILE__)
    lambda { FSR::App::Playback.new("shout://scfire-ntc-aa01.stream.aol.com/stream/1035") }.
      should.not.raise(Errno::ENOENT)
  end

end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
freeswitcher-0.6.1 spec/fsr/app/playback.rb
freeswitcher-0.6.0 spec/fsr/app/playback.rb
freeswitcher-0.5.11 spec/fsr/app/playback.rb
freeswitcher-0.5.10 spec/fsr/app/playback.rb
freeswitcher-0.5.9 spec/fsr/app/playback.rb
freeswitcher-0.5.8 spec/fsr/app/playback.rb
freeswitcher-0.5.7 spec/fsr/app/playback.rb
freeswitcher-0.5.6 spec/fsr/app/playback.rb
freeswitcher-0.5.5 spec/fsr/app/playback.rb
freeswitcher-0.5.4 spec/fsr/app/playback.rb
freeswitcher-0.5.3 spec/fsr/app/playback.rb
freeswitcher-0.5.2 spec/fsr/app/playback.rb
freeswitcher-0.5.1 spec/fsr/app/playback.rb
freeswitcher-0.5.0 spec/fsr/app/playback.rb