summaryrefslogtreecommitdiff
path: root/test/irb/test_completion.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/irb/test_completion.rb')
-rw-r--r--test/irb/test_completion.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb
index a765bbf3a5..39d4be4a5a 100644
--- a/test/irb/test_completion.rb
+++ b/test/irb/test_completion.rb
@@ -47,5 +47,13 @@ module TestIRB
assert_include candidates, word
end
end
+
+ def test_complete_predicate?
+ candidates = IRB::InputCompletor.retrieve_completion_data("1.posi", bind: binding)
+ assert_equal %w[1.positive?], candidates
+
+ namespace = IRB::InputCompletor.retrieve_completion_data("1.positive?", bind: binding, doc_namespace: true)
+ assert_equal "Integer.positive?", namespace
+ end
end
end