How to check the gear before renting a bike?
If you're talking about a derailleur-style bike, a quick check is to suspend the rear wheel somehow (sometimes you can hang the nose of the seat on something, eg, or see if the rental place doesn't have a work stand) and crank the pedals with your hand while you shift through the gears.  On a bike with indexed shifters the transitions should be smooth and you should hear no more than very slight "chatter" from the chain once the transition is complete.