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

43 lines
734 B
Ruby
Raw Normal View History

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?
def has_mongo_mapper?
defined?(MongoMapper)
end
module_function :has_mongo_mapper?
def has_ripple?
defined?(Ripple)
end
module_function :has_ripple?
2014-01-07 02:10:56 -05:00
def has_nobrainer?
defined?(NoBrainer)
end
module_function :has_nobrainer?
end
RSpec.configure do |config|
config.include(ExtVerifier)
config.extend(ExtVerifier)
end