module Pry::Testable
Constants
- TEST_DEFAULTS
Public Class Methods
included(mod)
click to toggle source
When {Pry::Testable} is included into another module or class, the following modules are also included: {Pry::Testable::Mockable}, {Pry::Testable::Evalable}, {Pry::Testable::Variables}, and {Pry::Testable::Utility}.
@note
Each of the included modules mentioned above may also be used standalone or in a pick-and-mix fashion.
@param [Module] mod
A class or module.
@return [void]
# File lib/pry/testable.rb, line 28 def self.included(mod) mod.module_eval do include Pry::Testable::Mockable include Pry::Testable::Evalable include Pry::Testable::Variables include Pry::Testable::Utility end end
set_testenv_variables()
click to toggle source
Sets various configuration options that make Pry optimal for a test environment, see source code for complete details.
@return [void]
# File lib/pry/testable.rb, line 57 def self.set_testenv_variables Pry.config = Pry::Config.from_hash(TEST_DEFAULTS, Pry::Config::Default.new) Pry.config.hooks = Pry::Hooks.new end
unset_testenv_variables()
click to toggle source
Reset the Pry configuration to their default values.
@return [void]
# File lib/pry/testable.rb, line 67 def self.unset_testenv_variables Pry.config = Pry::Config.from_hash({}, Pry::Config::Default.new) end