My `~/.pryrc` file
Pry.config.prompt = Pry::Prompt[:simple] | |
Pry.config.pager = false | |
## | |
# Support refinements at top level in Pry. | |
Pry.hooks.add_hook :when_started, :context_switch do |_output, _binding, pry| | |
pry.binding_stack = [TOPLEVEL_BINDING] | |
end | |
## | |
# Add a `paste` command for clipboard paste support. | |
begin | |
require 'clipboard' | |
Pry::Commands.block_command 'paste', 'Paste from the clipboard.' do | |
_pry_.input = StringIO.new Clipboard.paste | |
end | |
rescue LoadError | |
end | |
## | |
# Provide an incrementable `assertions` attr_accessor to use assertions | |
# a la carte. Normally this would already be provided by Minitest::Runnable | |
# but we want to play with assertions from the top level! \o/ | |
require 'minitest' | |
module Minitest::Assertions | |
attr_writer :assertions | |
def assertions | |
@assertions ||= 0 | |
end | |
end | |
include Minitest::Assertions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment