1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/lib/pry/helpers
Kyrylo Silin b92065d465 helpers/command_helpers: add tests, refactor variable names
First of all, we move the spec file from `spec` to `spec/helpers`. This is where
it is supposed to be.

Next, we add tests for all the methods that the module defines. During this
process I had to change `module_function` to `extend self`. Rubocop doesn't like
it for some unknown to me reason, so I had to disable the rule. There's no harm
in doing so.

Finally, I refactored some methods (low-hanging fruits only) and discovered that
the `command_error` method is not necessary at all.

All in all, this module is a lot better now but I feel like it shouldn't exist
at all, since almost all methods are very specific to certain Pry commands. It's
hardly a general purpose module for Pry plugins.
2019-03-30 20:53:06 +02:00
..
base_helpers.rb helpers/command_helpers: add tests, refactor variable names 2019-03-30 20:53:06 +02:00
command_helpers.rb helpers/command_helpers: add tests, refactor variable names 2019-03-30 20:53:06 +02:00
documentation_helpers.rb Stop requiring coderay in files that don't use it 2019-03-28 02:38:21 +02:00
options_helpers.rb rubocop: fix offences of the Metrics/LineLength cop 2019-03-03 17:37:58 +02:00
platform.rb rubocop: disable Style/DoubleNegation 2019-03-23 20:03:52 +02:00
table.rb rubocop: fix the Lint/Void cop 2019-03-24 18:49:40 +02:00
text.rb helpers/command_helpers: add tests, refactor variable names 2019-03-30 20:53:06 +02:00