Sha256: 49f7c873d8880f850062976f464d682521f1fa6a99d099839ddd953efd567614
Contents?: true
Size: 886 Bytes
Versions: 10
Compression:
Stored size: 886 Bytes
Contents
module SpecInfra module Configuration class << self VALID_OPTIONS_KEYS = [ :path, :pre_command, :stdout, :stderr, :sudo_path, :disable_sudo, :pass_prompt, :sudo_options, :docker_image, :lxc, :request_pty, ].freeze def defaults VALID_OPTIONS_KEYS.inject({}) { |o, k| o.merge!(k => send(k)) } end def method_missing(meth, val=nil) key = meth.to_s key.gsub!(/=$/, '') if val instance_variable_set("@#{key}", val) RSpec.configuration.send(:"#{key}=", val) if defined?(RSpec) end ret = instance_variable_get("@#{key}") if ret.nil? && defined?(RSpec) && RSpec.configuration.respond_to?(key) ret = RSpec.configuration.send(key) end ret end end end end
Version data entries
10 entries across 10 versions & 1 rubygems