ruby: add some test code