I'm trying to write a simple spec dispatcher, the client-side of which essentially does the following:

options = Spec::Runner::OptionParser.parse( "#{file}", $stderr, std_out )
options.line_number = line
Spec::Runner::CommandLine.run(options)

Given a spec file and a line number, it'll run the spec. Simple enough.

My problem is on the server side trying to pull out individual specs to be run out of a file/series of files. The above code works well if I pre-populate and array as follows:

queue = [["spec/one_spec.rb", 9],
         ["spec/one_spec.rb", 28],
         ["spec/one_spec.rb", 35]]

But I'm having a hard time figuring out how to pull out a list of examples given a spec filename. Is this parsed at some point before running, and can I get to that list easily enough?

Thanks for all the help!

Sean

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to