Improved tests

Added $testScalar property to Rule class and its subclasses that would tell to the code generate whether we are expecting an scalar or if we don't care about it