-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor key actor test #645
Conversation
test/reline/helper.rb
Outdated
def assert_line(expected) | ||
expected = convert_str(expected) | ||
assert_equal(expected, @line_editor.line) | ||
def assert_cursor_line(before, after) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think assert_cursor_line
is not clear regarding what it asserts. I think it would be better for this method name to include the meaning of before the cursor and after the cursor.
How about renaming it to assert_line_around_cursor
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name assert_line_around_cursor
sounds good. Thanks, renamed.
cf16222
to
6376184
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🌟
(ruby/reline#645) * Add assertion assert_cursor_line to test helper * Autofix key_actor test to use assert_cursor_line * Rename the assertion to assert_line_around_cursor and remove other assertions for line and cursor ruby/reline@e4773800c6
(ruby/reline#645) * Add assertion assert_cursor_line to test helper * Autofix key_actor test to use assert_cursor_line * Rename the assertion to assert_line_around_cursor and remove other assertions for line and cursor ruby/reline@e4773800c6
Description
test_key_actor_*.rb
has these kind of ideomsWe only need this assertion.
Commits
The "Autofix" commit is done by this script https://gist.github.com/tompng/215d11c9cf2c825755960b9b934a7167
Then, manually fixed remaining things by hand.