script_helper.rb 332 B

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