Class: CucumberVoIP::RayoDriver
- Inherits:
-
Object
- Object
- CucumberVoIP::RayoDriver
- Defined in:
- lib/cucumber-voip/rayo_driver.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
- .method_missing(method_name, *args, &block) ⇒ Object
- .respond_to?(method_name) ⇒ Boolean
- .tester_instance ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ RayoDriver
constructor
A new instance of RayoDriver.
- #start ⇒ Object
Constructor Details
#initialize ⇒ RayoDriver
Returns a new instance of RayoDriver.
33 34 35 36 37 38 39 40 41 |
# File 'lib/cucumber-voip/rayo_driver.rb', line 33 def initialize @options = { :jid => '[email protected]', :password => '1', :host => '127.0.0.1', :queue_timeout => 30, :write_timeout => 30 } end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
11 12 13 |
# File 'lib/cucumber-voip/rayo_driver.rb', line 11 def @options end |
Class Method Details
.method_missing(method_name, *args, &block) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/cucumber-voip/rayo_driver.rb', line 20 def method_missing(method_name, *args, &block) if tester_instance.respond_to? method_name tester_instance.send method_name, *args, &block else super end end |
.respond_to?(method_name) ⇒ Boolean
28 29 30 |
# File 'lib/cucumber-voip/rayo_driver.rb', line 28 def respond_to?(method_name) super || tester_instance.respond_to?(method_name) end |
.tester_instance ⇒ Object
16 17 18 |
# File 'lib/cucumber-voip/rayo_driver.rb', line 16 def tester_instance @@tester_instance ||= new end |
Instance Method Details
#start ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/cucumber-voip/rayo_driver.rb', line 47 def start raise StandardError, 'You cannot start the Rayo driver more than once!' if @rayo @rayo = RSpecRayo::RayoDriver.new :username => [:jid], :password => [:password], :host => [:host], :port => [:port], :queue_timeout => [:queue_timeout], :write_timeout => [:write_timeout] begin @rayo.wait_for_connection 10 rescue Timeout::Error abort 'Could not connect to Rayo Server. Aborting!' end end |