module Specinfra::Configuration
Constants
- VALID_OPTIONS_KEYS
Public Class Methods
defaults()
click to toggle source
# File lib/specinfra/configuration.rb, line 27 def defaults VALID_OPTIONS_KEYS.inject({}) { |o, k| o.merge!(k => send(k)) } end
method_missing(meth, val=nil)
click to toggle source
# File lib/specinfra/configuration.rb, line 41 def method_missing(meth, val=nil) key = meth.to_s key.gsub!(/=$/, '') ret = nil begin if ! val.nil? instance_variable_set("@#{key}", val) RSpec.configuration.send(:"#{key}=", val) if defined?(RSpec) end ret = instance_variable_get("@#{key}") rescue NameError ret = nil ensure if ret.nil? && defined?(RSpec) && RSpec.configuration.respond_to?(key) ret = RSpec.configuration.send(key) end end ret end
os(value=nil)
click to toggle source
Define os method explicitly to avoid stack level too deep caused by Helper::DetectOS#os
# File lib/specinfra/configuration.rb, line 33 def os(value=nil) @os = value if value if @os.nil? && defined?(RSpec) && RSpec.configuration.respond_to?(:os) @os = RSpec.configuration.os end @os end