[SCM] ci-tooling packaging branch, master, updated. 0ddea031e5294406d4f21618e377a70854b24041
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Thu Oct 29 12:00:58 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=0451979
The following commit has been merged in the master branch:
commit 04519798ac857b52e5494767aa35ae56e2be469e
Author: Harald Sitter <sitter at kde.org>
Date: Thu Oct 29 12:43:31 2015 +0100
intoduce a lovely assert to do a typecheck
---
test/lib/testcase.rb | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/test/lib/testcase.rb b/test/lib/testcase.rb
index c1f3d76..747ce90 100644
--- a/test/lib/testcase.rb
+++ b/test/lib/testcase.rb
@@ -28,6 +28,17 @@ class TestCase < Test::Unit::TestCase
subclass.autodetect_inherited_file unless @file
end
+ def assert_is_a(obj, expected)
+ actual = obj.class.ancestors | obj.class.included_modules
+ diff = AssertionMessage.delayed_diff(expected, actual)
+ format = <<EOT
+<?> expected but its ancestors and includes are at the very least
+<?>.?
+EOT
+ message = build_message(message, format, expected, actual, diff)
+ assert_block(message) { obj.is_a?(expected) }
+ end
+
def priority_setup
fail ATFILEFAIL unless self.class.file
script_base_path = File.expand_path(File.dirname(self.class.file))
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list