Sha256: e09901db5270e0755892ae7e6c8e79cadb18e007500729e601026b171a92e369
Contents?: true
Size: 656 Bytes
Versions: 45
Compression:
Stored size: 656 Bytes
Contents
require 'yaml' require 'erb' module Cucumber module WireSupport class Configuration attr_reader :host, :port def initialize(wire_file) params = YAML.load(ERB.new(File.read(wire_file)).result) @host = params['host'] @port = params['port'] @timeouts = default_timeouts.merge(params['timeout'] || {}) end def timeout(message = nil) return @timeouts[message.to_s] || 3 end private def default_timeouts { 'invoke' => 120, 'begin_scenario' => 120, 'end_scenario' => 120 } end end end end
Version data entries
45 entries across 43 versions & 9 rubygems