Sha256: 84f9aa609a41eec4a40ca1a68769e9e628a0042bb37a5f78c4c94b81dcc90eb9
Contents?: true
Size: 1.03 KB
Versions: 108
Compression:
Stored size: 1.03 KB
Contents
#!/usr/bin/env ruby # Runner for non-parallel execution of a single scenario. # It prints all the info stdout, etc and basically replaces itself with the scenario execution. # It is useful when we work with a single spec and we need all the debug info raise 'This code needs to be executed WITHOUT bundle exec' if Kernel.const_defined?(:Bundler) require 'open3' require 'fileutils' require 'pathname' require 'tmpdir' require 'etc' ROOT_PATH = Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), '../'))) # Load all the specs specs = Dir[ROOT_PATH.join('spec/integrations/**/*.rb')] # If filters is provided, apply # Allows to provide several filters one after another and applies all of them ARGV.each do |filter| specs.delete_if { |name| !name.include?(filter) } end raise ArgumentError, "No integration specs with filters: #{ARGV.join(', ')}" if specs.empty? raise ArgumentError, "Many specs found with filters: #{ARGV.join(', ')}" if specs.size != 1 exec("bundle exec ruby -r #{ROOT_PATH}/spec/integrations_helper.rb #{specs[0]}")
Version data entries
108 entries across 108 versions & 1 rubygems