method
load_class
load_class(name, kind, option)
protected
Hide source
# File lib/spec/runner/options.rb, line 267 def load_class(name, kind, option) if name =~ /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ arg = $2 == "" ? nil : $2 [$1, arg] else m = "#{name.inspect} is not a valid class name" @error_stream.puts m raise m end begin eval(name, binding, __FILE__, __LINE__) rescue NameError => e @error_stream.puts "Couldn't find #{kind} class #{name}" @error_stream.puts "Make sure the --require option is specified *before* #{option}" if $_spec_spec ; raise e ; else exit(1) ; end end end