Save syndication sources to posts
This commit is contained in:
20
spec/support/feature_loader.rb
Normal file
20
spec/support/feature_loader.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "dry/system"
|
||||
|
||||
RSpec.configure do |config|
|
||||
Dir[File.join(__dir__, "*.rb")].sort.each do |file|
|
||||
options = Dry::System::MagicCommentsParser.call(file)
|
||||
tag_name = options[:require_with_metadata]
|
||||
|
||||
next unless tag_name
|
||||
|
||||
tag_name = File.basename(file, File.extname(file)) if tag_name.eql?(true)
|
||||
|
||||
config.when_first_matching_example_defined(tag_name.to_sym) do
|
||||
require file
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Dir[SPEC_ROOT.join("support", "**", "global_config.rb")].each { require _1 }
|
Reference in New Issue
Block a user