ref: refs/heads/master
commit e27308052fdbbc8ecc310aa1a3e82189bbc0ad8e
Author: Martin Vidner
Date: Tue Jul 28 09:33:07 2009 +0200
Fixed style of testsuite, now it fails even more.
---
ruby-polkit/Makefile | 3 +++
ruby-polkit/test/permissions.rb | 14 ++++----------
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/ruby-polkit/Makefile b/ruby-polkit/Makefile
index 71deb5c..0d0f1f2 100644
--- a/ruby-polkit/Makefile
+++ b/ruby-polkit/Makefile
@@ -17,6 +17,9 @@ uninstall:
doc: src/Makefile
(cd src; rdoc --all --line-numbers --charset=UTF-8 --fmt=html -p --inline-source --op=rdoc)
+# autotools style
+check: test
+# rake style
test: all
(cd test; make)
diff --git a/ruby-polkit/test/permissions.rb b/ruby-polkit/test/permissions.rb
index cbd7586..1e4dc60 100644
--- a/ruby-polkit/test/permissions.rb
+++ b/ruby-polkit/test/permissions.rb
@@ -7,28 +7,22 @@ require 'test/unit'
class PolKitTest < Test::Unit::TestCase
def test_root
- assert PolKit::polkit_check( "org.freedesktop.policykit.read", "root") == :auth
+ assert_equal :auth, PolKit::polkit_check( "org.freedesktop.policykit.read", "root")
end
def test_nobody
- assert PolKit::polkit_check( "org.freedesktop.policykit.read", "nobody") == :auth
+ assert_equal :auth, PolKit::polkit_check( "org.freedesktop.policykit.read", "nobody")
end
def test_unknown_user
- begin
+ assert_raise RuntimeError do
PolKit::polkit_check( "org.freedesktop.policykit.read", "unknown")
- assert false # not reached
- rescue Exception => e
- assert true
end
end
def test_unknown_action
- begin
+ assert_raise RuntimeError do
PolKit::polkit_check( "foo.bar", "root")
- assert false # not reached
- rescue Exception => e
- assert true
end
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org