Module: EacRubyUtils::Rspec::Setup::Conditionals

Defined in:
lib/eac_ruby_utils/rspec/setup/conditionals.rb

Instance Method Summary collapse

Instance Method Details

#conditional(tag, &condition) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/eac_ruby_utils/rspec/setup/conditionals.rb', line 7

def conditional(tag, &condition)
  message = condition.call
  return if message.blank?

  puts("[WARN] Excluded tag: #{tag}: #{message}")
  rspec_config.filter_run_excluding tag
end