mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
fe0786d27c
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.
27 lines
477 B
Ruby
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
|