Sha256: f587e8709853ddf7cd3cfad306a9bac0e9fa6814a16a4be37039bf1dac4f91fd
Contents?: true
Size: 724 Bytes
Versions: 8
Compression:
Stored size: 724 Bytes
Contents
module SpecInfra module Configuration class << self VALID_OPTIONS_KEYS = [:path, :pre_command, :stdout, :stderr, :sudo_path, :pass_prompt].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
8 entries across 8 versions & 1 rubygems