added tests for Rule, make toString return formatted style style string