module Pry::Testable

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 30
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 45
def self.set_testenv_variables
  Pry.config = Pry::Config.new.merge(
    color: false,
    pager: false,
    should_load_rc: false,
    should_load_local_rc: false,
    correct_indent: false,
    collision_warning: false,
    history_save: false,
    history_load: false,
    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 64
def self.unset_testenv_variables
  Pry.config = Pry::Config.new
end