nimbus_spec_helper.rb 357 B

12345678910111213141516171819202122
  1. module NimbusSpecHelper
  2. module_function
  3. def setup
  4. nimbus_path = File.expand_path(
  5. File.join(
  6. File.dirname(__FILE__),
  7. 'json-jwt-nimbus',
  8. 'nimbus_jwe.rb'
  9. )
  10. )
  11. if File.exist? nimbus_path
  12. require nimbus_path
  13. end
  14. end
  15. def nimbus_available?
  16. defined? NimbusJWE
  17. end
  18. end
  19. NimbusSpecHelper.setup