There is a test case for --no-api options being used in conjunction with --api, however it does not take in consideration of YardocTask.
When passing both these options to YardocTask, it creates an incorrect verifier expression due to Yardoc#parse_arguments being run twice. On the first pass Yardoc#parse_arguments executes Yardoc#add_api_verifier which delete the no_api placeholder. On the second pass Yardoc#run also executes Yardoc#parse_arguments and subsequently Yardoc#add_api_verifier but the placeholder for no_api is removed thus invalidating the Verifier expression and generates nothing.
Only parse_arguments one time in YardocTask