you say that it failed if command name or service name is missing, but test only one case. In fact there should be three cases with A, B and A&B missing. But I do not see why to test it as it is common exception of ruby to raise if there is argument number missmatch