remove unused function from spy_on_spec