Back in the 17th century, that was a common tactic among merchant ships that sailed in pirate-infested waters. But as you noted, a pirate willing to take a little risk could find out for sure.
Pirating was an inherently risky business. That potential target over there ... is she an armed merchantman or a Sloop o' War? A pirate bet his life on guessing correctly.
None of which brings me any closer to knowing exactly what, during the Age of Sail, was literally meant by 'gundecking'.