Sha256: 6953a019a9ccc5693b3424df0ce8ea3e2680ef6f0d6dd879481a95efb2df5099
Contents?: true
Size: 812 Bytes
Versions: 10
Compression:
Stored size: 812 Bytes
Contents
#!/usr/bin/env ruby unless ARGV[0] puts "Usage: #{__FILE__} <feature> [--debug|--pretty]" exit 4 end __DIR__ = File.expand_path(File.dirname(__FILE__)) features_dir = File.expand_path(File.join(__DIR__, '..', 'features')) feature = ARGV[0] unless File.exists?(feature) feature = File.join(features_dir, ARGV[0]) end unless File.exist?(feature) puts "Error: feature file doesn't exist!" exit 4 end command_parts = [] command_parts << "#{__DIR__}/cucumber" command_parts << "--require #{features_dir}" if ARGV.include?("--pretty") command_parts << "--format pretty" else command_parts << "--format Cucumber::Formatter::Nagios" end command_parts << feature command = command_parts.join(' ') if ARGV.grep(/^\-\-debug$/).size > 0 puts command puts end system(command) ? exit(0) : exit(2)
Version data entries
10 entries across 10 versions & 1 rubygems