decoupled some spec functions in utilities.rb