add test for rule constructor