Added some specs for detect functions