I did that once, didn't have any elbows left. It looked tacky but was completely legal and safe.
2009 IRC G2419.4 Sediment trap. Where a sediment trap is not incorporated as part of the appliance, a sediment trap shall be installed downstream of the appliance shutoff valve as close to the inlet of the appliance as practical. The sediment trap shall be either a tee fitting having a capped nipple of any length installed vertically in the bottom-most opening of the tee or other device approved as an effective sediment trap. Illuminating appliances, ranges, clothes dryers and outdoor grilles need not be so equipped.
Aside from testing for gas leaks with an open flame being illegal per the code and the obvious insanity, it is worthless for leaks under 44,000 ppm NG or 21,500ppm LPG since those are the lower flammability limits. Leaks under these levels can NOT be detected by an open flame.