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.8.0 spec/fsr/app/playback.rb
freeswitcher-0.7.1 spec/fsr/app/playback.rb
freeswitcher-0.7.0 spec/fsr/app/playback.rb
freeswitcher-0.6.18 spec/fsr/app/playback.rb
freeswitcher-0.6.17 spec/fsr/app/playback.rb
freeswitcher-0.6.16 spec/fsr/app/playback.rb
freeswitcher-0.6.15 spec/fsr/app/playback.rb
freeswitcher-0.6.14 spec/fsr/app/playback.rb
freeswitcher-0.6.13 spec/fsr/app/playback.rb
freeswitcher-0.6.12 spec/fsr/app/playback.rb
freeswitcher-0.6.11 spec/fsr/app/playback.rb
freeswitcher-0.6.10 spec/fsr/app/playback.rb
freeswitcher-0.6.9 spec/fsr/app/playback.rb
freeswitcher-0.6.8 spec/fsr/app/playback.rb
freeswitcher-0.6.7 spec/fsr/app/playback.rb
freeswitcher-0.6.6 spec/fsr/app/playback.rb
freeswitcher-0.6.5 spec/fsr/app/playback.rb
freeswitcher-0.6.4 spec/fsr/app/playback.rb
freeswitcher-0.6.3 spec/fsr/app/playback.rb
freeswitcher-0.6.2 spec/fsr/app/playback.rb