adding all of botlist, initial add
[botlist.git] / openbotlist / WEB-INF / lib / ruby / rspec / lib / spec / runner / class_and_arguments_parser.rb
blob65dc4519c87880ff9fa7005bfb0d2bede24e8e7f
1 module Spec
2   module Runner
3     class ClassAndArgumentsParser
4       class << self
5         def parse(s)
6           if s =~ /([a-zA-Z_]+(?:::[a-zA-Z_]+)*):?(.*)/
7             arg = $2 == "" ? nil : $2
8             [$1, arg]
9           else
10             raise "Couldn't parse #{s.inspect}"
11           end
12         end
13       end
14     end
15   end
16 end