summaryrefslogtreecommitdiff
path: root/test/irb/cmd/test_show_source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/irb/cmd/test_show_source.rb')
-rw-r--r--test/irb/cmd/test_show_source.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/irb/cmd/test_show_source.rb b/test/irb/cmd/test_show_source.rb
index 89b1142390..cedec8aa6f 100644
--- a/test/irb/cmd/test_show_source.rb
+++ b/test/irb/cmd/test_show_source.rb
@@ -39,6 +39,19 @@ module TestIRB
assert_match(%r[/irb\/init\.rb], out)
end
+ def test_show_source_with_missing_signature
+ write_ruby <<~'RUBY'
+ binding.irb
+ RUBY
+
+ out = run_ruby_file do
+ type "show_source foo"
+ type "exit"
+ end
+
+ assert_match(%r[Couldn't locate a definition for foo], out)
+ end
+
def test_show_source_string
write_ruby <<~'RUBY'
binding.irb