method
parse_file_options
rspec latest stable - Class:
Spec::Runner::OptionParser
parse_file_options(option_name, action)protected
No documentation available.
# File lib/spec/runner/option_parser.rb, line 155
def parse_file_options(option_name, action)
# Remove the file option and the argument before handling the file
options_file = nil
options_list = OPTIONS[option_name][0..1]
options_list[1].gsub!(" PATH", "")
options_list.each do |option|
if index = @argv.index(option)
@argv.delete_at(index)
options_file = @argv.delete_at(index)
end
end
if options_file.nil? &&
File.exist?('spec/spec.opts') &&
[email protected]?{|a| a =~ /^\-/ }
options_file = 'spec/spec.opts'
end
if options_file
send(action, options_file)
return true
else
return false
end
end