mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 04:07:58 +00:00
[ruby/rubygems] Add before(:context) hook to warn when spec files are not assigned to any Windows runner group
https://github.com/ruby/rubygems/commit/3ddb740969
This commit is contained in:
parent
412895ae84
commit
d105709f2b
@ -139,4 +139,11 @@ RSpec.configure do |config|
|
||||
metadata[tag] = true
|
||||
end
|
||||
end
|
||||
|
||||
config.before(:context) do |example|
|
||||
metadata = example.class.metadata
|
||||
if metadata[:type] != :aruba && metadata.keys.none? {|k| Spec::WindowsTagGroup::EXAMPLE_MAPPINGS.keys.include?(k) }
|
||||
warn "#{metadata[:file_path]} is not assigned to any Windows runner group. see spec/support/windows_tag_group.rb for details."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# This group classifies test files into 4 groups by running `bin/rspec --profile 10000`
|
||||
# to ensure balanced execution times. When adding new test files, it is recommended to
|
||||
# re-aggregate and adjust the groups to keep them balanced.
|
||||
# For now, please add new files to group 'windows_d'.
|
||||
|
||||
module Spec
|
||||
module WindowsTagGroup
|
||||
EXAMPLE_MAPPINGS = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user