script_helper.rb 409 B

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