Minor oil leaks which are not immediately detectable, such as a small oil leak spot when the vehicle is parked should not effect the smog check. If the oil leak is so bad that it's causing drivability problems, such as an internal oil leak, then yes, the smog test could be effected either due to high exhaust emissions or smoke trouble; part of the smog check inspects for smoke being emitted from the exhaust and/or under the hood.
If your car has an external oil leak, such as from the engine oil pan or valve cover gasket (perhaps even the transmission) and it is severe enough the smog technician may refuse to inspect your vehicle or, if during the test the oil leaks become apparent and effect the testing procedures, the technician can decide to abort the test, in which case you may be responsible for the inspection fee without obtaining a completed smog inspection.