Sha256: 27b06dace7859c643da9309f68ef9219db32ece4cac774c012dd62a6c1da56c1
Contents?: true
Size: 768 Bytes
Versions: 5
Compression:
Stored size: 768 Bytes
Contents
#!/usr/bin/env ruby require 'pathname' unless ARGV[0] puts "Usage: #{__FILE__} <feature> [--debug|--pretty]" exit 4 end root = Pathname.new(File.dirname(__FILE__)).expand_path feature_dir = root.join('..', 'features').expand_path feature, line = ARGV[0].split(':') unless File.exist?(feature) puts "Error: feature file '#{feature}' doesn't exist!" exit 4 end parts = [] parts << "cucumber" parts << "--require #{feature_dir}" parts << "--format pretty" if ARGV.include?("--pretty") parts << "--format Cucumber::Formatter::Nagios" unless ARGV.include?("--pretty") parts << "#{line ? "#{feature}:#{line}" : feature }" command = parts.join(' ') if ARGV.grep(/^\-\-debug$/).size > 0 puts command puts end system(command) ? exit(0) : exit(2)
Version data entries
5 entries across 5 versions & 1 rubygems