defined? for a symbol literal is always truthy. defined?(ActiveJob::QueueAdapters::BackburnerAdapter) would also work as an alternative.
module ActiveJob
module QueueAdapters
# Adapter removed from rails
end
end
module ActiveJob
module QueueAdapters
remove_const(:BackburnerAdapter) if defined?(:BackburnerAdapter)
end
end
test.rb:10:in 'remove_const': constant ActiveJob::QueueAdapters::BackburnerAdapter not defined (NameError)
Followup to #180
defined?
for a symbol literal is always truthy.defined?(ActiveJob::QueueAdapters::BackburnerAdapter)
would also work as an alternative.test.rb:10:in 'remove_const': constant ActiveJob::QueueAdapters::BackburnerAdapter not defined (NameError)