module Spec module Runner class ClassAndArgumentsParser def self.parse(s) if s =~ /([a-zA-Z_]+(?:::[a-zA-Z_]+)*):?(.*)/ arg = $2 == "" ? nil : $2 [$1, arg] else raise "Couldn't parse #{s.inspect}" end end end end end