assert template should raise ArgumentError for unsupported layout types

fixes that  `assert_template(layout: 1)` will not fail (false positive), also tried to refactor `assert_template` by splitting up in smaller chunks covered in private methods. Stopped at :partial since it not seemed to be covered by tests. 
Please be consistent in semantics, e.g. if calling method `matches_layout` rather than `assert_matches_layout` then it shouldn't assert inside the method but instead be called like `assert matches_layout`. Otherwise method name should be `assert_matches_layout` etc.