Add tests for rulesDirectory