Sha256: b2708f1b9036be459b5e29bc81f407aea4c24a2825ab2be49861e2fca57cf286
Contents?: true
Size: 617 Bytes
Versions: 12
Compression:
Stored size: 617 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}" } 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
12 entries across 12 versions & 1 rubygems