summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-07-30 02:56:29 +0900
committeraycabta <aycabta@gmail.com>2021-07-30 02:56:29 +0900
commit41e2ab88c3722a7de7c5bbe189754d32a83bc52e (patch)
tree4259e57723f76a7999ad5e4561d1434faea4b844
parent1c9cb9da8fa601c747cb90baba5fe6834b28914f (diff)
Use test-unit assertions
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4693
-rw-r--r--test/reline/windows/test_key_event_record.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/reline/windows/test_key_event_record.rb b/test/reline/windows/test_key_event_record.rb
index 607b8c3b24..60dae3e3f8 100644
--- a/test/reline/windows/test_key_event_record.rb
+++ b/test/reline/windows/test_key_event_record.rb
@@ -10,31 +10,31 @@ class Reline::Windows
end
def test_matches__with_no_arguments_raises_error
- assert_raises(ArgumentError) { @key.matches? }
+ assert_raise(ArgumentError) { @key.matches? }
end
def test_matches_char_code
- assert_true @key.matches?(char_code: 0x1)
+ assert @key.matches?(char_code: 0x1)
end
def test_matches_virtual_key_code
- assert_true @key.matches?(virtual_key_code: 0x41)
+ assert @key.matches?(virtual_key_code: 0x41)
end
def test_matches_control_keys
- assert_true @key.matches?(control_keys: :CTRL)
+ assert @key.matches?(control_keys: :CTRL)
end
def test_doesnt_match_alt
- assert_false @key.matches?(control_keys: :ALT)
+ refute @key.matches?(control_keys: :ALT)
end
def test_doesnt_match_empty_control_key
- assert_false @key.matches?(control_keys: [])
+ refute @key.matches?(control_keys: [])
end
def test_matches_control_keys_and_virtual_key_code
- assert_true @key.matches?(control_keys: :CTRL, virtual_key_code: 0x41)
+ assert @key.matches?(control_keys: :CTRL, virtual_key_code: 0x41)
end
end