IBS is one of the most commonly misdiagnosed conditions.
There really is no test for it. It is something that is diagnosed after ruling everything else out. I know someone who was diagnosed with IBS and then after moving and switching doctors learned that it was simply a case of lactose intolerance. I've also learned that gluten intolerance can be misdiagnosed as IBS as well.