Testing?

Is it ok to take a pregnancy test while youre spotting? Is that too early if its implantation bleeding?