module RuboCop::RSpec::Util

def one(array)

Return only element in array if it contains exactly one member
def one(array)
  return array.first if array.one?
  raise SizeError,
        "expected size to be exactly 1 but size was #{array.size}"
end