From 2cab4f2fa642241dbcaf8881d39bd275a59dc67b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 23 Mar 2012 11:56:04 -0700 Subject: [PATCH] test_tryopen: fix horribly-named test for EACCES We can't actually test for EPERM without changing permissions/ownership, and we can't do that without root... --- test/test_tryopen.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_tryopen.rb b/test/test_tryopen.rb index 80b5de3..8a8278c 100644 --- a/test/test_tryopen.rb +++ b/test/test_tryopen.rb @@ -26,11 +26,11 @@ class TestTryopen < Test::Unit::TestCase assert_equal :ENOENT, tmp end - def test_tryopen_EPERM + def test_tryopen_EACCES tmp = Tempfile.new "tryopen" File.chmod 0000, tmp.path tmp = Kgio::File.tryopen(tmp.path) - assert_equal :EACCES, tmp + assert_equal(:EACCES, tmp) end def test_tryopen_readwrite -- 2.11.4.GIT