Permalink
Browse files

Added a test unit which uses EM.set_effective_user("non_existing_user…

…") and expects ArgumentError, but of course EM raises a C++ exception and exits (related to issue #1).
  • Loading branch information...
1 parent 4d845c6 commit 530184db9d21eb162476ae4f8ab75994f00135d9 @ibc committed Feb 26, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 tests/test_no_cpp_exceptions.rb
@@ -0,0 +1,16 @@
+require 'em_test_helper'
+
+class TestNoCppExceptions < Test::Unit::TestCase
+
+ def test_set_effective_user_with_non_existing_user
+
+ assert_raise ArgumentError do
+ EM.run do
+ EM.set_effective_user "non_existing_user"
+ EM.stop
+ end
+ end
+
+ end
+
+end

0 comments on commit 530184d

Please sign in to comment.