It really depends on the shop. The shops I have worked at did not require them. But I know of a couple shops that did require them. Those that do require them will have test helmets. Even the shops I worked at that didn't require them had test helmets. If you wanted to test ride a bike and forgot your helmet, I'm sure they will find one for you if they didn't have test helmets.
I don't think any shop would require you to buy a helmet before riding the bike. It wouldn't make good business sense. "Oh, you want a test ride?, OK, first let's buy a helmet." How many people would just say that they didn't want to buy a helmet until they have a bike? The shop doesn't want to lose a sale for this reason.