trabajo-afectivo/spec/support/script_helper.rb

14 lines
408 B
Ruby
Raw Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
module ScriptHelper
def has_ipv6?
File.exist?('/proc/net/if_inet6') && system('ip -6 addr | grep ::1')
end
end
RSpec.configure do |config|
# #extend adds setup methods for example groups (#describe / #context);
# #include adds methods within actual examples (#it blocks)
config.extend ScriptHelper, type: :script
end