You can just collect the gas in an open tube -- open end up if the gas is denser than air, open end down if the gas is lighter than air. In either case, the gas displaces the air, and you have a tube full for further analysis -- sniff test, moist litmus paper, or what have you. If you need to quantitate the gas, you can use a gas syringe to hold and measure it. But if you need pure, clean, dry gas for another reaction, you might as well just buy a tank.