Sha256: 0146ca4140cc8c5bf10eb1490a1e766ef71618c44a43df4524e9d9670bd50519

Contents?: true

Size: 1.06 KB

Versions: 12

Compression:

Stored size: 1.06 KB

Contents

require 'spec/helper'


describe "Testing FSR module loading methods" do
  # When you add applications  you must modify the expected apps_loaded behavior
  it "Loads all applications" do
    all_apps = [:play_and_get_digits, :uuid_dump, :uuid_setvar, :uuid_getvar, :read, :set, :transfer, :speak, :fs_sleep, :playback, :answer, :fifo, :bridge, :hangup, :conference, :fs_break, :log, :limit]
    # Add any apps which will load to this set
    apps_loaded = FSR.load_all_applications
    apps_loaded.kind_of?(Array).should == true
    all_apps.each do |app|
      apps_loaded.delete(app).should == app
    end
    apps_loaded.size.should == 0
  end

  # When you add commands  you must modify the expected cmds_loaded behavior
  it "Loads all commands" do
    all_commands = [:originate, :sofia, :fsctl, :sofia_contact, :status, :calls] # If you add a command add it to this set
    cmds_loaded = FSR.load_all_commands
    cmds_loaded.kind_of?(Array).should == true
    all_commands.each do |cmd|
      cmds_loaded.delete(cmd).should == cmd
    end
    cmds_loaded.size.should == 0
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
bougyman-freeswitcher-0.1.3 spec/fsr/loading.rb
bougyman-freeswitcher-0.1.4 spec/fsr/loading.rb
bougyman-freeswitcher-0.3.0 spec/fsr/loading.rb
bougyman-freeswitcher-0.3.1 spec/fsr/loading.rb
bougyman-freeswitcher-0.4.0 spec/fsr/loading.rb
bougyman-freeswitcher-0.4.1 spec/fsr/loading.rb
freeswitcher-0.1.4 spec/fsr/loading.rb
freeswitcher-0.1.3 spec/fsr/loading.rb
freeswitcher-0.4.0 spec/fsr/loading.rb
freeswitcher-0.4.1 spec/fsr/loading.rb
freeswitcher-0.3.1 spec/fsr/loading.rb
freeswitcher-0.3.0 spec/fsr/loading.rb