diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2019-03-24 17:15:27 +0200 |
---|---|---|
committer | Kyrylo Silin <silin@kyrylo.org> | 2019-03-30 20:53:06 +0200 |
commit | b92065d465c81a1df33c05025d878a58cd4859c2 (patch) | |
tree | d8809fbdff6cc1d55bdeb9914cba94c1481fd25e /.rubocop.yml | |
parent | f3673d55f148c1004619dcf3fca4906d576d97b5 (diff) | |
download | pry-b92065d465c81a1df33c05025d878a58cd4859c2.tar.gz |
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.
Diffstat (limited to '.rubocop.yml')
-rw-r--r-- | .rubocop.yml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index ee3c8c06..8c2d4e5b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -68,3 +68,6 @@ Style/CommentedKeyword: Gemspec/RequiredRubyVersion: Enabled: false + +Style/ModuleFunction: + Enabled: false |