Sha256: bf0afd6c31826b28326dabd0425a181f82dd5aabf6d2a893965e3407bfe50e5d
Contents?: true
Size: 650 Bytes
Versions: 18
Compression:
Stored size: 650 Bytes
Contents
require_relative '../../commands' RubyLeiningen::Commands.define_custom_command("eftest") do |config, opts| only = opts[:only] ? [":only #{opts[:only]}"] : [] specific = (opts[:test_selectors] || []) .map { |m| m.is_a?(Symbol) ? ":#{m}" : "#{m}" } all = [":all"] test_selectors = if only.any? only elsif specific.any? specific else all end namespaces = opts[:namespaces] || [] files = opts[:files] || [] arguments = namespaces.concat(files).concat(test_selectors) config.on_command_builder do |command| arguments.inject(command) do |c, arg| c.with_argument(arg) end end end
Version data entries
18 entries across 18 versions & 1 rubygems