summaryrefslogtreecommitdiff
path: root/tests/white-box/dummy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/white-box/dummy.rb')
-rw-r--r--tests/white-box/dummy.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/white-box/dummy.rb b/tests/white-box/dummy.rb
index 6ca49754..a3e8ad68 100644
--- a/tests/white-box/dummy.rb
+++ b/tests/white-box/dummy.rb
@@ -41,6 +41,17 @@ class TestDummy < LeapTest
pass
end
+ def test_warn
+ block_test do
+ warn "not everything", "is a success or failure"
+ end
+ end
+
+ # used to test extracting the proper caller even when in a block
+ def block_test
+ yield
+ end
+
def test_socket_success
fork {
Socket.tcp_server_loop('localhost', 12345) do |sock, client_addrinfo|