#!/usr/bin/env jruby require 'rubygems' require 'optparse' require 'rspec' require 'rbconfig' require 'operawatir' require 'operawatir/helper' @options = { :ng => false, :color_enabled => OperaWatir::Platform.os == :windows ? false : true, :check_syntax => false, :format => 'progress' } # TODO # Should steal https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/option_parser.rb begin OptionParser.new do |opts| opts.banner = < e abort "operawatir: Unknown option `#{e.to_s.sub(/invalid option:\s+/, '')}'" end if ARGV.empty? abort 'operawatir: You need to specify at least one test file to run' else @options[:files_to_run] = ARGV end OperaWatir::Helper.run! @options