1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00
awesome_print/spec/support/ext_verifier.rb
James Cox fe0786d27c Remove mongomapper support.
it's out of date, and I don't have time to migrate and validate it.

Ideally, these 3rd party lib formatters should be added by that lib,
rather than awesome_print introspecting into the lib.
2019-01-23 15:04:12 -05:00

27 lines
477 B
Ruby

module ExtVerifier
def require_dependencies!(dependencies)
dependencies.each do |dependency|
begin
require dependency
rescue LoadError
end
end
end
module_function :require_dependencies!
def has_rails?
defined?(Rails)
end
module_function :has_rails?
def has_mongoid?
defined?(Mongoid)
end
module_function :has_mongoid?
end
RSpec.configure do |config|
config.include(ExtVerifier)
config.extend(ExtVerifier)
end