diff --git a/lib/rspec/openapi/shared_hooks.rb b/lib/rspec/openapi/shared_hooks.rb index d3496b9..2069cea 100644 --- a/lib/rspec/openapi/shared_hooks.rb +++ b/lib/rspec/openapi/shared_hooks.rb @@ -1,12 +1,8 @@ module SharedHooks def self.find_extractor - names = Bundler.load.specs.map(&:name) - - if names.include?('rails') && defined?(Rails) && - Rails.respond_to?(:application) && Rails.application + if defined?(Rails) && Rails.respond_to?(:application) && Rails.application RSpec::OpenAPI::Extractors::Rails - elsif names.include?('hanami') && defined?(Hanami) && - Hanami.respond_to?(:app) && Hanami.app? + elsif defined?(Hanami) && Hanami.respond_to?(:app) && Hanami.app? RSpec::OpenAPI::Extractors::Hanami # elsif defined?(Roda) # some Roda extractor