2014-12-31 15:59:32 -05:00
|
|
|
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?
|
2014-12-31 15:59:32 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
config.include(ExtVerifier)
|
|
|
|
config.extend(ExtVerifier)
|
|
|
|
end
|