Skip to content

Conversation

lovro-bikic
Copy link
Contributor

@lovro-bikic lovro-bikic commented Aug 3, 2025

Adds a new cop to register offenses for local variables assigned outside of examples, but referenced within them. In such cases, local variables are shared state, and they can make tests non-deterministic if they run in random order.

The cop will register offenses for:

user = create(:user)

# local variable referenced in an example
it 'updates user' do
  user.update(foo: :bar)
end

# local variable referenced in the subject
subject { user.foo }

# local variable referenced in a let
let(:my_user) { user }

# local variable referenced in a hook
before do
  user.update(foo: :bar)
end

# local variable passed to included examples
it_behaves_like 'some examples', user

The cop does not register offenses when local variable is:

examples = foo ? 'some examples' : 'other examples'

# used in an example description
it "passes for #{examples}" { ... }

# used to include other examples
it_behaves_like examples

I think this closes #1648. There are some other ideas in there, but I believe this cop solves the major pain point (which is shared state between examples through local variables).


Before submitting the PR make sure the following are checked:

  • Added the new cop to config/default.yml.
  • The cop is configured as Enabled: pending in config/default.yml.
  • The cop is configured as Enabled: true in .rubocop.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.
  • Set VersionAdded: "<<next>>" in default/config.yml.

@lovro-bikic lovro-bikic requested a review from a team as a code owner August 3, 2025 11:01
@lovro-bikic
Copy link
Contributor Author

lovro-bikic commented Aug 3, 2025

Here's the cop report for real-world-rspec. I wrote a custom formatter which prints the URL to the file and line on the remote, so you can go through it and see offenses directly on GH.

There are 866 offenses for all codebases in that repo.

Report
# rubocop ../real-world-rspec/*/spec --only RSpec/LeakyLocalVariable

# https://github.com/activeadmin/activeadmin/blob/01f1430df290f117a3adcef9b772a61ec1bfe5b2/spec/helpers/filter_form_helper_spec.rb#L477
if_true = verb == :if ? :to : :to_not

# https://github.com/activeadmin/activeadmin/blob/01f1430df290f117a3adcef9b772a61ec1bfe5b2/spec/helpers/filter_form_helper_spec.rb#L478
if_false = verb == :if ? :to_not : :to

# https://github.com/thoughtbot/administrate/blob/dd3ce76cc2b882fe9bac226ebe8f4a08613e48aa/spec/example_app/spec/features/pagination_spec.rb#L3
search_input_selector = ".search__input"

# https://github.com/owen2345/camaleon-cms/blob/67de8835871935b18409c1a87a1666641c69c420/spec/features/admin/users_spec.rb#L7
uname = "testerr_#{Time.current.to_i}"

# https://github.com/owen2345/camaleon-cms/blob/67de8835871935b18409c1a87a1666641c69c420/spec/features/admin/users_spec.rb#L8
uemail = "testerr_#{Time.current.to_i}@gmail.com"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/appointment_groups_api_spec.rb#L36
expected_fields = %w[ ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/calendar_events_api_spec.rb#L42
expected_fields = %w[ ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/calendar_events_api_spec.rb#L73
expected_slot_fields = (expected_fields + %w[appointment_group_id appointment_group_url can_manage_appointment_group available_slots participants_per_appointment reserve_url participant_type effective_context_code])

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/calendar_events_api_spec.rb#L74
expected_reservation_event_fields = (expected_fields + %w[appointment_group_id appointment_group_url can_manage_appointment_group effective_context_code participant_type])

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/calendar_events_api_spec.rb#L75
expected_reserved_fields = (expected_slot_fields + ["reserved", "reserve_comments"])

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/calendar_events_api_spec.rb#L76
expected_reservation_fields = expected_reservation_event_fields - ["child_events"]

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/calendar_events_api_spec.rb#L77
expected_series_fields = expected_fields + ["series_head", "series_natural_language"]

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/calendar_events_api_spec.rb#L2954
expected_fields = %w[ ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/calendar_events_api_spec.rb#L4615
expected_sub_assignment_fields = %w[ ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/enrollments_api_spec.rb#L1411
student_grade = lambda do |json| ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/observer_alerts_api_controller_spec.rb#L28
alerts = []

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/outcomes_api_spec.rb#L728
norm_error_message = "not a valid value for this calculation method"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/outcomes_api_spec.rb#L729
no_calc_int_error_message = "A calculation value is not used with this calculation method"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/outcomes_api_spec.rb#L730
bad_calc_int = 1500

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/quizzes/quiz_submission_events_api_spec.rb#L45
events_data = [{ ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/apis/v1/quizzes/quiz_submissions_api_spec.rb#L758
now = Time.now.utc

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/controllers/lti/ims/dynamic_registration_controller_spec.rb#L32
openapi_location = File.join(File.dirname(__FILE__), "openapi", "dynamic_registration.yml")

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/controllers/lti/ims/dynamic_registration_controller_spec.rb#L33
openapi_spec = YAML.load_file(openapi_location)

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/controllers/lti/ims/dynamic_registration_controller_spec.rb#L35
verifier = OpenApiSpecHelper::SchemaVerifier.new(openapi_spec)

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/graphql/loaders/sisid_loader_spec.rb#L38
sis_source_id = "12345"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/graphql/loaders/sisid_loader_spec.rb#L41
sis_source_id_account_1 = "111-111"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/graphql/loaders/sisid_loader_spec.rb#L42
sis_source_id_account_2 = "222-222"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/helpers/inst_llm_helper_spec.rb#L22
model_id = "model123"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/integration/login/openid_connect_controller_spec.rb#L22
keypair = OpenSSL::PKey::RSA.new(2048).freeze

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/integration/login/openid_connect_controller_spec.rb#L23
jwk = JSON::JWK.new(keypair.public_key).freeze

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/integration/login/openid_connect_controller_spec.rb#L158
logout_token_base = { ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/lib/api/v1/moderation_grader_spec.rb#L24
api = (Class.new do ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/lib/canvas/errors_spec.rb#L25
error_testing_class = Class.new do ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/lib/crummy_spec.rb#L49
name_run_proc = proc do ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/lib/crummy_spec.rb#L81
url_run_proc = proc do ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/lib/feature_flag_definitions_spec.rb#L37
hook_name = definition[hook]

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/lib/microsoft_sync/partial_membership_diff_spec.rb#L135
expected_actions = ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/lib/outcomes/import_spec.rb#L567
fd = "A friendly description"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/messages/new_files_added.erb_spec.rb#L28
file_names = ["file1.txt", "file2.txt", "file3.txt", "file4.txt", "file5.txt"]

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/authentication_provider/open_id_connect_spec.rb#L239
base_payload = { ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/content_tag_spec.rb#L26
mock_asset = Class.new do ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/content_tag_spec.rb#L63
mock_asset = Class.new do ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/course_pace_spec.rb#L482
orig_zone = Time.zone

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/course_pace_spec.rb#L546
orig_zone = Time.zone

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/learning_outcome_spec.rb#L820
invalid_value_error = "not a valid value for this calculation method"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/learning_outcome_spec.rb#L821
unused_value_error = "A calculation value is not used with this calculation method"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/planner_override_spec.rb#L64
mock_asset = Class.new do ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/planner_override_spec.rb#L101
mock_asset = Class.new do ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/role_spec.rb#L291
roles_to_test = %w[designer observer ta teacher student]

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/role_spec.rb#L292
role_names = { ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/role_spec.rb#L301
role_key_to_test = (mode == "adding") ? :addable_by_user : :deleteable_by_user

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/role_spec.rb#L302
opposite_role_key_to_test = (mode == "adding") ? :deleteable_by_user : :addable_by_user

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/role_spec.rb#L303
permission_key = (mode == "adding") ? :"add_#{perm_role}_to_course" : "remove_#{perm_role}_from_course"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/models/submission_spec.rb#L5107
should_not_be_missing = submissions_that_cant_be_missing.include?(sub_type)

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/announcements/announcements_index_v2_spec.rb#L147
page_header_title_all = "Announcements"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/announcements/announcements_index_v2_spec.rb#L148
page_header_title_unread = "Unread Announcements"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/assignments/assignments_spec.rb#L1747
all_options = ["Percentage", "Complete/Incomplete", "Points", "Letter Grade", "GPA Scale", "Not Graded"]

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/collaborations/collaborations_form_student_spec.rb#L32
title = "Google Docs"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/collaborations/collaborations_form_student_spec.rb#L33
type = "google_docs"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/collaborations/collaborations_form_teacher_spec.rb#L32
title = "Google Docs"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/collaborations/collaborations_form_teacher_spec.rb#L33
type = "google_docs"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/collaborations/collaborations_student_spec.rb#L32
title = "Google Docs"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/collaborations/collaborations_student_spec.rb#L33
type = "google_docs"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/collaborations/collaborations_teacher_spec.rb#L32
title = "Google Docs"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/collaborations/collaborations_teacher_spec.rb#L33
type = "google_docs"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/conferences/big_blue_button_conference_spec.rb#L29
bbb_endpoint = "bbb.blah.com"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/conferences/big_blue_button_conference_spec.rb#L30
bbb_secret = "mock-secret"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/discussions/discussions_index_page_student_v2_spec.rb#L43
discussion1_title = "Meaning of life"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/discussions/discussions_index_page_student_v2_spec.rb#L44
discussion2_title = "Meaning of the universe"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/discussions/discussions_index_page_teacher_v2_spec.rb#L34
discussion1_title = "Meaning of life"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/discussions/discussions_index_page_teacher_v2_spec.rb#L35
discussion2_title = "Meaning of the universe"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/discussions/discussions_index_page_teacher_v2_spec.rb#L455
page_header_title_all = "Discussions"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/discussions/discussions_index_page_teacher_v2_spec.rb#L456
page_header_title_unread = "Unread Discussions"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/discussions/discussions_new_page_spec.rb#L985
page_header_title_discussion = "Create Discussion"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/discussions/discussions_new_page_spec.rb#L986
page_header_title_announcement = "Create Announcement"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_folders_spec.rb#L33
folder_name = "base folder"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L35
base_file_name = "example.pdf"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L152
a_txt_file_name = "a_file.txt"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L153
b_txt_file_name = "b_file.txt"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L221
a_txt_file_name = "a_file.txt"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L222
b_txt_file_name = "b_file.txt"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L305
a_txt_file_name = "a_file.txt"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L306
b_txt_file_name = "b_file.txt"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L307
mp3_file_name = "292.mp3"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L518
a_txt_file_name = "a_file.txt"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L545
folder_name = "base folder"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L546
file_to_move = "a_file.txt"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_spec.rb#L547
txt_files = ["a_file.txt", "b_file.txt", "c_file.txt"]

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/files_v2/files_student_spec.rb#L31
txt_files = ["a_file.txt", "b_file.txt", "c_file.txt"]

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/gradebook/gradebook_mgp_spec.rb#L43
now = Time.zone.now

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/grading_standards/grading_standards_mgp_spec.rb#L104
group_name_1 = "Group 1"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/grading_standards/grading_standards_mgp_spec.rb#L105
group_name_2 = "Group 2"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/grading_standards/grading_standards_mgp_spec.rb#L106
term_name_1 = "First Term"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/grading_standards/grading_standards_mgp_spec.rb#L107
term_name_2 = "Second Term"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/grading_standards/grading_standards_mgp_spec.rb#L108
period_name_1 = "A Grading Period"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/grading_standards/grading_standards_mgp_spec.rb#L109
period_name_2 = "Another Grading Period"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/student_grades_page/student_grades_page_assignment_details_spec.rb#L42
grades = [ ...

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/student_grades_page/student_grades_page_spec.rb#L118
past_period_name = "Past Grading Period"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/student_grades_page/student_grades_page_spec.rb#L119
current_period_name = "Current Grading Period"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/student_grades_page/student_grades_page_spec.rb#L120
past_assignment_name = "Past Assignment"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/grades/student_grades_page/student_grades_page_spec.rb#L121
current_assignment_name = "Current Assignment"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/helpers/groups_shared_examples.rb#L314
folder_name = "new folder"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/helpers/groups_shared_examples.rb#L395
folder_name = "new folder"

# https://github.com/instructure/canvas-lms/blob/f30a0d20cd58801a3385d4356ce116006462b732/spec/selenium/navigation/new_ui_spec.rb#L85
folder_name = "base folder"

# https://github.com/teamcapybara/capybara/blob/0480f90168a40780d1398c75031a255c1819dce8/spec/selenium_spec_firefox.rb#L11
browser_options = Selenium::WebDriver::Firefox::Options.new

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/lib/carto/table_utils_spec.rb#L8
table_utils = TableUtilsTest.new

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L22
today = example[:today]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L23
period_end_date = example[:period_end_date]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L24
expected = example[:expected]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L41
today = example[:today]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L42
period_end_date = example[:period_end_date]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L43
expected = example[:expected]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L59
today = example[:today]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L60
period_end_date = example[:period_end_date]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L61
expected = example[:expected]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L88
today = example[:today]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L89
period_end_date = example[:period_end_date]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L90
expected = example[:expected]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L107
today = example[:today]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L108
period_end_date = example[:period_end_date]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L109
expected = example[:expected]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L125
today = example[:today]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L126
period_end_date = example[:period_end_date]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/billing_spec.rb#L127
expected = example[:expected]

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/user_migration_helper.rb#L4
records = ...

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/helpers/user_migration_helper.rb#L10
agg_ds_config = ...

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/user_migration_api_key_spec.rb#L206
records = ...

# https://github.com/CartoDB/cartodb/blob/0af73ea4937f33b5862c55c24b85e9f00eeb7a12/spec/models/carto/user_migration_api_key_spec.rb#L212
agg_ds_config = ...

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/controllers/api/v1/accounts/agents_controller_spec.rb#L107
params = { name: 'TestUser' }

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/controllers/api/v1/accounts/agents_controller_spec.rb#L156
params = { name: 'NewUser', email: Faker::Internet.email, role: :agent }

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/controllers/api/v1/accounts_controller_spec.rb#L186
params = { ...

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/controllers/public/api/v1/csat_survey_controller_spec.rb#L23
params = { message: { submitted_values: { csat_survey_response: { rating: 4, feedback_message: 'amazing experience' } } } }

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/controllers/slack_uploads_controller_spec.rb#L7
blob = ActiveStorage::Blob.create_and_upload! io: file, filename: 'avatar.png'

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/enterprise/controllers/api/v1/accounts/agents_controller_spec.rb#L11
params = { name: 'NewUser', email: Faker::Internet.email, role: :agent }

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/jobs/bulk_actions_job_spec.rb#L4
params = { ...

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/jobs/inboxes/sync_widget_pre_chat_custom_fields_job_spec.rb#L4
pre_chat_fields = [{ ...

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/jobs/inboxes/sync_widget_pre_chat_custom_fields_job_spec.rb#L11
pre_chat_message = 'Share your queries here.'

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/jobs/inboxes/update_widget_pre_chat_custom_fields_job_spec.rb#L4
pre_chat_fields = [{ ...

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/jobs/inboxes/update_widget_pre_chat_custom_fields_job_spec.rb#L11
pre_chat_message = 'Share your queries here.'

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/jobs/inboxes/update_widget_pre_chat_custom_fields_job_spec.rb#L12
custom_attribute = { ...

# https://github.com/chatwoot/chatwoot/blob/51b9fd8eca76930ffb4f26adfe202ea1d326e534/spec/services/whatsapp/send_on_whatsapp_service_spec.rb#L4
template_params = { ...

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/support/shared/unit/resource/static_provider_resolution.rb#L27
action           = opts[:action]

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/support/shared/unit/resource/static_provider_resolution.rb#L28
provider_class   = opts[:provider]

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/support/shared/unit/resource/static_provider_resolution.rb#L29
resource_class   = opts[:resource]

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/support/shared/unit/resource/static_provider_resolution.rb#L30
name             = opts[:name]

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/support/shared/unit/resource/static_provider_resolution.rb#L31
os               = opts[:os]

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/support/shared/unit/resource/static_provider_resolution.rb#L32
platform_family  = opts[:platform_family]

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/support/shared/unit/resource/static_provider_resolution.rb#L33
platform_version = opts[:platform_version]

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/cookbook/metadata_spec.rb#L219
check_with = dep_args.shift

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/cookbook/metadata_spec.rb#L236
check_with = dep_args.shift

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/cookbook/metadata_spec.rb#L237
normalized_version = dep_args.pop

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/dsl/render_helpers_spec.rb#L37
json = Chef::DSL::RenderHelpers.render_json(hash)

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/dsl/render_helpers_spec.rb#L63
toml = Chef::DSL::RenderHelpers.render_toml(hash)

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/dsl/render_helpers_spec.rb#L82
yaml = Chef::DSL::RenderHelpers.render_yaml(hash)

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/mixin/openssl_helper_spec.rb#L115
cipher = ::OpenSSL::Cipher.new("des3")

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/mixin/shell_out_spec.rb#L243
stubbed_method = (method == :shell_out) ? :shell_out_compacted : :shell_out_compacted!

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/mixin/shell_out_spec.rb#L278
stubbed_method = (method == :shell_out) ? :shell_out_compacted : :shell_out_compacted!

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/mixin/template_spec.rb#L36
template_contents = [ "Fancy\r\nTemplate\r\n\r\n", ...

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/property/state_spec.rb#L42
properties = properties.map { |property| "property #{property}" }

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/property/validation_spec.rb#L80
properties = properties.map { |property| "property #{property}" }

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/property_spec.rb#L61
properties, tags = properties[0..tags_index - 1], properties[tags_index..-1]

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/group/groupadd_spec.rb#L48
field_list = { ...

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/package/snap_spec.rb#L52
find_result_success = JSON.parse(File.read(File.join(CHEF_SPEC_DATA, "snap_package", "find_result_success.json")))

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/package/snap_spec.rb#L53
find_result_fail = JSON.parse(File.read(File.join(CHEF_SPEC_DATA, "snap_package", "find_result_failure.json")))

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/package/snap_spec.rb#L54
get_by_name_result_success = JSON.parse(File.read(File.join(CHEF_SPEC_DATA, "snap_package", "get_by_name_result_success.json")))

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/package/snap_spec.rb#L55
get_by_name_result_fail = JSON.parse(File.read(File.join(CHEF_SPEC_DATA, "snap_package", "get_by_name_result_failure.json")))

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/package/snap_spec.rb#L56
async_result_success = JSON.parse(File.read(File.join(CHEF_SPEC_DATA, "snap_package", "async_result_success.json")))

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/package/snap_spec.rb#L57
result_fail = JSON.parse(File.read(File.join(CHEF_SPEC_DATA, "snap_package", "result_failure.json")))

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/service/systemd_service_spec.rb#L301
enabled_and_active = <<-STDOUT

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/service/systemd_service_spec.rb#L305
disabled_and_inactive = <<-STDOUT

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/service/systemd_service_spec.rb#L310
nil_and_inactive = <<-STDOUT

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/systemd_unit_spec.rb#L849
enabled_and_active = <<-STDOUT

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/systemd_unit_spec.rb#L853
disabled_and_inactive = <<-STDOUT

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/systemd_unit_spec.rb#L930
masked_and_inactive = <<-STDOUT

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/systemd_unit_spec.rb#L968
static_and_active = <<-STDOUT

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/systemd_unit_spec.rb#L1006
indirect_and_inactive = <<-STDOUT

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/user/linux_spec.rb#L31
supported_useradd_options = { ...

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/provider/user/pw_spec.rb#L50
field_list = { ...

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/run_lock_spec.rb#L27
default_cache_path = windows? ? 'C:\chef' : "/var/chef"

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/run_lock_spec.rb#L28
default_pid_location = windows? ? 'C:\chef\cache\chef-client-running.pid' : "/var/chef/cache/chef-client-running.pid"

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/version/platform_spec.rb#L44
the_error = Chef::Exceptions::InvalidPlatformVersion

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/version_class_spec.rb#L58
the_error = Chef::Exceptions::InvalidCookbookVersion

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/version_constraint_spec.rb#L25
o_error = Chef::Exceptions::InvalidVersionConstraint

# https://github.com/chef/chef/blob/1f31efb32d240e18024d490016f4705e06f5b484/spec/unit/version_constraint_spec.rb#L26
v_error = Chef::Exceptions::InvalidCookbookVersion

# https://github.com/danger/danger/blob/dd8cd228b631113e6ea3af30cc75e3a6b7a6da51/spec/lib/danger/danger_core/plugins/dangerfile_gitlab_plugin_spec.rb#L22
method = data[:method]

# https://github.com/danger/danger/blob/dd8cd228b631113e6ea3af30cc75e3a6b7a6da51/spec/lib/danger/danger_core/plugins/dangerfile_gitlab_plugin_spec.rb#L23
expected = data[:expected_result]

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/integrity/i18n_spec.rb#L75
english_yaml = load_yaml(english_path)["en"]

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/integrity/i18n_spec.rb#L88
locale = extract_locale(path)

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/integrity/i18n_spec.rb#L89
yaml = load_yaml(path)

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/lib/freedom_patches/web_push_spec.rb#L3
klass = defined?(WebPush) ? WebPush : Webpush

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/lib/inline_oneboxer_spec.rb#L23
url = "https://example.com/good-url"

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/lib/stylesheet/compiler_spec.rb#L10
path = File.basename(path, ".scss")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/models/emoji_spec.rb#L53
expected_url = "/images/emoji/twitter/blonde_woman.png?v=#{Emoji::EMOJI_VERSION}"

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/models/emoji_spec.rb#L54
expected_toned_url = "/images/emoji/twitter/blonde_woman/6.png?v=#{Emoji::EMOJI_VERSION}"

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/models/report_spec.rb#L188
pluralized = arg.to_s.pluralize

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/multisite/request_tracker_spec.rb#L126
app_callback = ->(env) { env["DISCOURSE_IS_ASSET_PATH"] = true }

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/rails_helper.rb#L200
blk ||= proc { Fabricate(fabricator_name || name) }

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/backups_spec.rb#L41
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/backups_spec.rb#L45
expected_response_schema = load_spec_schema("backups_list_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/backups_spec.rb#L88
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/backups_spec.rb#L93
expected_response_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/backups_spec.rb#L108
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/backups_spec.rb#L114
expected_response_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/badges_spec.rb#L18
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/badges_spec.rb#L22
expected_response_schema = load_spec_schema("badge_list_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/badges_spec.rb#L36
expected_request_schema = load_spec_schema("badge_create_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/badges_spec.rb#L41
expected_response_schema = load_spec_schema("badge_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/badges_spec.rb#L59
expected_request_schema = load_spec_schema("badge_update_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/badges_spec.rb#L65
expected_response_schema = load_spec_schema("badge_update_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/badges_spec.rb#L83
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/badges_spec.rb#L88
expected_response_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L18
expected_request_schema = load_spec_schema("category_create_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L23
expected_response_schema = load_spec_schema("category_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L39
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L44
expected_response_schema = load_spec_schema("category_list_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L62
expected_request_schema = load_spec_schema("category_create_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L68
expected_response_schema = load_spec_schema("category_update_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L89
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L93
expected_response_schema = load_spec_schema("category_topics_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L113
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/categories_spec.rb#L117
expected_response_schema = load_spec_schema("category_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L17
expected_request_schema = load_spec_schema("group_create_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L22
expected_response_schema = load_spec_schema("group_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L40
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L44
expected_response_schema = load_spec_schema("success_ok_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L66
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L70
expected_response_schema = load_spec_schema("group_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L115
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L119
expected_response_schema = load_spec_schema("group_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L142
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L146
expected_response_schema = load_spec_schema("group_members_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L165
expected_request_schema = load_spec_schema("group_add_members_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L170
expected_response_schema = load_spec_schema("group_add_members_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L191
expected_request_schema = load_spec_schema("group_remove_members_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L196
expected_response_schema = load_spec_schema("group_remove_members_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L218
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/groups_spec.rb#L222
expected_response_schema = load_spec_schema("groups_list_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L224
expected_request_schema = load_spec_schema("topic_create_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L229
expected_response_schema = load_spec_schema("topic_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L258
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L264
expected_response_schema = load_spec_schema("post_show_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L277
expected_response_schema = load_spec_schema("post_show_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L304
expected_request_schema = load_spec_schema("post_update_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L310
expected_response_schema = load_spec_schema("post_update_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L335
expected_request_schema = load_spec_schema("post_delete_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L341
expected_response_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L362
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/posts_spec.rb#L367
expected_response_schema = load_spec_schema("post_replies_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/site_spec.rb#L20
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/site_spec.rb#L27
expected_response_schema = load_spec_schema("site_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/site_spec.rb#L47
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/site_spec.rb#L51
expected_response_schema = load_spec_schema("site_basic_info_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/tags_spec.rb#L71
expected_request_schema = load_spec_schema("tag_group_create_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/tags_spec.rb#L77
expected_response_schema = load_spec_schema("tag_group_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/topics_spec.rb#L219
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/topics_spec.rb#L225
expected_response_schema = load_spec_schema("topic_show_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L66
expected_request_schema = load_spec_schema("upload_generate_presigned_put_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L71
expected_response_schema = load_spec_schema("upload_generate_presigned_put_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L121
expected_request_schema = load_spec_schema("upload_complete_external_upload_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L126
expected_response_schema = load_spec_schema("upload_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L162
expected_request_schema = load_spec_schema("upload_create_multipart_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L167
expected_response_schema = load_spec_schema("upload_create_multipart_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L220
expected_request_schema = load_spec_schema("upload_batch_presign_multipart_parts_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L225
expected_response_schema = ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L270
expected_request_schema = load_spec_schema("upload_abort_multipart_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L275
expected_response_schema = load_spec_schema("success_ok_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L319
expected_request_schema = load_spec_schema("upload_complete_multipart_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/uploads_spec.rb#L324
expected_response_schema = load_spec_schema("upload_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/user_badges_spec.rb#L17
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/user_badges_spec.rb#L22
expected_response_schema = load_spec_schema("user_badges_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L23
expected_request_schema = load_spec_schema("user_create_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L28
expected_response_schema = load_spec_schema("user_create_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L57
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L61
expected_response_schema = load_spec_schema("user_get_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L73
expected_response_schema = load_spec_schema("user_get_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L92
expected_request_schema = load_spec_schema("user_update_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L98
expected_response_schema = load_spec_schema("user_update_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L120
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L124
expected_response_schema = load_spec_schema("user_get_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L158
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L162
expected_response_schema = load_spec_schema("user_get_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L191
expected_request_schema = load_spec_schema("user_update_avatar_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L198
expected_response_schema = load_spec_schema("success_ok_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L220
expected_request_schema = load_spec_schema("user_update_email_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L231
expected_response_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L246
expected_request_schema = load_spec_schema("user_update_username_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L257
expected_response_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L272
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L306
expected_response_schema = load_spec_schema("users_public_list_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L322
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L330
expected_response_schema = load_spec_schema("admin_user_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L344
expected_request_schema = load_spec_schema("user_delete_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L361
expected_response_schema = load_spec_schema("user_delete_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L377
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L384
expected_response_schema = load_spec_schema("success_ok_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L400
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L407
expected_response_schema = load_spec_schema("success_ok_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L423
expected_request_schema = load_spec_schema("user_suspend_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L433
expected_response_schema = load_spec_schema("user_suspend_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L449
expected_request_schema = load_spec_schema("user_silence_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L459
expected_response_schema = load_spec_schema("user_silence_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L475
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L483
expected_response_schema = load_spec_schema("user_anonymize_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L499
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L507
expected_response_schema = load_spec_schema("success_ok_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L536
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L545
expected_response_schema = load_spec_schema("user_refresh_gravatar_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L561
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L611
expected_response_schema = load_spec_schema("admin_user_list_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L627
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L685
expected_response_schema = load_spec_schema("admin_user_list_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L701
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L713
expected_response_schema = load_spec_schema("user_actions_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L731
expected_request_schema = load_spec_schema("user_password_reset_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L736
expected_response_schema = load_spec_schema("user_password_reset_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L755
expected_request_schema = load_spec_schema("user_password_change_request")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L761
expected_response_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L782
expected_request_schema = nil

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/api/users_spec.rb#L787
expected_response_schema = load_spec_schema("user_emails_response")

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2670
expected_slug_response = expected[:secure_topic] == 200 ? 301 : expected[:secure_topic]

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2682
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2697
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2712
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2728
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2744
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2760
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2776
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2794
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2809
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2825
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2841
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2857
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/requests/topics_controller_spec.rb#L2873
expected = { ...

# https://github.com/discourse/discourse/blob/04dbc622ab1e0197d16703ba47cf005ec93697ee/spec/system/staff_writes_only_mode_spec.rb#L4
password = SecureRandom.alphanumeric(20)

# https://github.com/errbit/errbit/blob/89d3198f1d9f3bbb56ca9336e0be8719203c43e9/spec/models/notice_observer_spec.rb#L36
custom_thresholds = [2, 4, 8, 16, 32, 64]

# https://github.com/thoughtbot/factory_bot/blob/6b67f18f02f61836f6e64f997b9e0c86fd9ff050/spec/factory_bot/sequence_spec.rb#L2
first_value = options[:first_value]

# https://github.com/thoughtbot/factory_bot/blob/6b67f18f02f61836f6e64f997b9e0c86fd9ff050/spec/factory_bot/sequence_spec.rb#L3
second_value = options[:second_value]

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/codepen_tag_spec.rb#L26
xss_links = %w( ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/dotnet_fiddle_tag_spec.rb#L7
xss_links = %w( ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/js_fiddle_tag_spec.rb#L8
xss_links = %w( ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/jsitor_tag_spec.rb#L7
xss_links = %w( ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/null_tag_spec.rb#L5
tags = %w[assign capture case cycle for if ifchanged include unless]

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/stackblitz_tag_spec.rb#L7
xss_links = %w( ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L16
valid_blogcast_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L21
valid_codesandbox_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L27
valid_glitch_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L33
valid_medium_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L38
valid_instagram_post_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L47
valid_instagram_profile_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L56
valid_kotlin_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L62
valid_loom_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L68
valid_replit_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L73
valid_spotify_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L83
valid_stackblitz_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L89
valid_stackexchange_stackoverflow_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L98
valid_twitch_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L106
valid_vimeo_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/liquid_tags/unified_embed/registry_spec.rb#L112
valid_youtube_url_formats = [ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/models/articles/feeds/variant_assembler_spec.rb#L6
variant = pathname.basename(".json").to_s

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/models/articles/feeds/variant_assembler_spec.rb#L23
variant = pathname.basename(".json").to_s.to_sym

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/models/shared_examples/taggable_spec.rb#L3
object = described_class.name.underscore.to_sym

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/policies/user_policy_spec.rb#L17
permitted_actions = %i[ ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/requests/admin/configs_spec.rb#L581
twitter_hashtag = "#DEVCommunity"

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/requests/admin/configs_spec.rb#L582
params = { ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/requests/feedback_messages_spec.rb#L24
valid_abuse_report_params = { ...

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/requests/feedback_messages_spec.rb#L33
headers = { "HTTP_FASTLY_CLIENT_IP" => "5.6.7.8" }

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/requests/tags_spec.rb#L135
valid_params = { tag: { text_color_hex: "", bg_color_hex: "" } }

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/services/articles/feeds/variant_query_spec.rb#L6
variant = pathname.basename(".json").to_s.to_sym

# https://github.com/forem/forem/blob/c8b5d2765e9e57f9dbd8d38295bcb0a0d268cbb9/spec/services/articles/feeds/variant_query_spec.rb#L95
variant = pathname.basename(".json").to_s.to_sym

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/config/bounded_contexts_spec.rb#L7
feature_categories = YAML.load_file(Rails.root.join('config/feature_categories.yml'))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/config/bounded_contexts_spec.rb#L8
domains = contexts.fetch('domains')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/config/bounded_contexts_spec.rb#L9
platform_libs = contexts.fetch('platform')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/controllers/projects/badges_controller_spec.rb#L188
action = :release

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/controllers/projects/hooks_controller_spec.rb#L33
hook_params = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L185
views = database_base_models.flat_map { |_, m| m.connection.views }.sort.uniq

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L186
directory_path = File.join('db', 'docs', 'views')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L187
required_fields = %i[feature_categories view_name gitlab_schema]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L195
tables = database_base_models.flat_map { |_, m| m.connection.tables }.sort.uniq

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L196
directory_path = File.join('db', 'docs')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L197
required_fields = %i[feature_categories table_name gitlab_schema milestone]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L203
directory_path = File.join('db', 'docs', 'deleted_tables')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L204
tables = Dir.glob(File.join(directory_path, '*.yml')).map { |f| File.basename(f, '.yml') }.sort.uniq

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L205
required_fields = %i[table_name gitlab_schema removed_by_url removed_in_milestone]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L211
directory_path = File.join('db', 'docs', 'deleted_views')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L212
views = Dir.glob(File.join(directory_path, '*.yml')).map { |f| File.basename(f, '.yml') }.sort.uniq

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/docs_spec.rb#L213
required_fields = %i[view_name gitlab_schema removed_by_url removed_in_milestone]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/db/schema_spec.rb#L592
primary_key_columns = Array.wrap(model.connection.primary_key(table_name))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/dot_gitlab_ci/rules_spec.rb#L11
config = YAML.safe_load_file( ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/dot_gitlab_ci/rules_spec.rb#L229
all_files = Dir.glob('{,**/}*', File::FNM_DOTMATCH) - ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/dot_gitlab_ci/rules_spec.rb#L232
all_files -= Dir.glob('ee/**/*', File::FNM_DOTMATCH) if foss_context

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/dot_gitlab_ci/rules_spec.rb#L266
pattern_files = patterns_files.fetch(pattern)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/dot_gitlab_ci/rules_spec.rb#L280
all_matching_files = Set.new

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/factories/design_management/designs.rb#L23
create_versions = ->(design, evaluator, commit_version) do # rubocop:disable RSpec/FactoryBot/LocalStaticAssignment ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/calendar_spec.rb#L13
date_format = '%A %b %-d, %Y'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/calendar_spec.rb#L15
issue_title = 'Bug in old browser'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/calendar_spec.rb#L16
issue_params = { title: issue_title }

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/cycle_analytics_spec.rb#L71
from = 2.days.ago.utc.to_date.iso8601

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/cycle_analytics_spec.rb#L72
to = 1.day.ago.utc.to_date.iso8601

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/cycle_analytics_spec.rb#L73
max_items_per_page = 3

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/groups/empty_states_spec.rb#L19
issuable_name = issuable.to_s.humanize.downcase

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/groups/empty_states_spec.rb#L20
project_relation = issuable == :issue ? :project : :source_project

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/groups/import_export/connect_instance_spec.rb#L17
source_url = 'https://gitlab.com'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/groups/members/filter_members_spec.rb#L14
filtered_search_bar_selector = '[data-testid="members-filtered-search-bar"]'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/issuables/issuable_list_spec.rb#L9
issuable_types = [:issue, :merge_request]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/issues/issue_sidebar_spec.rb#L102
sidebar_selector = 'aside.right-sidebar.right-sidebar-collapsed'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/merge_request/user_creates_image_diff_notes_spec.rb#L21
commit_id = '2f63565e7aac07bcdadb654e253078b727143ec4'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb#L12
dropdown_selector = '[data-testid="pipeline-mini-graph-dropdown"]'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb#L124
file1 = 'files/ruby/popen.rb'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb#L125
file2 = 'files/ruby/regex.rb'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/projects/files/user_browses_files_spec.rb#L330
ref_selector = '.ref-selector'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/projects/files/user_find_file_spec.rb#L11
global_search_modal_selector = '#super-sidebar-search-modal'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/projects/pipelines/pipelines_spec.rb#L579
dropdown_selector = '[data-testid="pipeline-mini-graph-dropdown"]'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/projects_spec.rb#L21
choose_template_selector = '.choose-template'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/projects_spec.rb#L22
template_option_selector = '.template-option'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/features/projects_spec.rb#L23
template_name_selector = '.description strong'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/admin.rb#L32
base_input_path = 'admin/groups/index/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/admin.rb#L34
query_name = 'groups.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/comment_templates.rb#L17
base_input_path = 'pages/profiles/comment_templates/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/comment_templates.rb#L19
query_name = 'saved_replies.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/comment_templates.rb#L31
base_input_path = 'pages/profiles/comment_templates/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/comment_templates.rb#L33
query_name = 'saved_replies.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/comment_templates.rb#L48
base_input_path = 'pages/profiles/comment_templates/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/comment_templates.rb#L50
query_name = 'create_saved_reply.mutation.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/comment_templates.rb#L62
base_input_path = 'pages/profiles/comment_templates/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/comment_templates.rb#L64
query_name = 'create_saved_reply.mutation.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/container_registry.rb#L17
project_container_protection_tag_rules_query_path = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/container_registry.rb#L19
create_container_protection_tag_rule_mutation_path = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/container_registry.rb#L21
delete_container_protection_tag_rule_mutation_path = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/container_registry.rb#L23
update_container_protection_tag_rule_mutation_path = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/dependency_proxy.rb#L30
update_docker_hub_credentials_mutation_path = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/deployments.rb#L31
deployment_query_path = 'deployments/graphql/queries/deployment.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/deployments.rb#L44
environment_query_path = 'deployments/graphql/queries/environment.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/environments.rb#L23
environment_details_query_path = 'environments/graphql/queries/environment_details.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/issues.rb#L117
issue_popover_query_path = 'issuable/popover/queries/issue.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/job_artifacts.rb#L15
job_artifacts_query_path = 'ci/artifacts/graphql/queries/get_job_artifacts.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/jobs.rb#L60
fixtures_path = 'graphql/jobs/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L135
base_input_path = 'vue_merge_request_widget/queries/states/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L137
query_name = 'ready_to_merge.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L149
base_input_path = 'vue_merge_request_widget/components/approvals/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L151
query_name = 'approvals.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L163
base_input_path = 'vue_merge_request_widget/components/approvals/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L165
query_name = 'approvals.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L179
base_input_path = 'vue_merge_request_widget/components/approvals/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L181
query_name = 'approvals.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L196
base_input_path = 'vue_merge_request_widget/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/merge_requests.rb#L198
query_name = 'get_state.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/namespaces.rb#L39
base_input_path = 'usage_quotas/storage/namespace/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/namespaces.rb#L67
query_name = 'namespace_storage.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/namespaces.rb#L111
query_name = 'project_list_storage.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/namespaces.rb#L181
input_path = "projects/settings/graphql/queries/#{query_name}"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L73
base_input_path = 'organizations/shared/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L75
query_name = 'current_user_organizations.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L87
base_input_path = 'organizations/shared/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L89
query_name = 'organizations.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L101
base_input_path = 'organizations/shared/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L103
query_name = 'groups.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L119
base_input_path = 'organizations/groups/edit/graphql/mutations/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L121
mutation_name = 'group_update.mutation.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L162
base_input_path = 'organizations/shared/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L164
query_name = 'projects.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L180
base_input_path = 'organizations/users/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L182
query_name = 'organization_users.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L202
base_input_path = 'organizations/new/graphql/mutations/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L204
mutation_name = 'organization_create.mutation.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L246
base_input_path = 'organizations/settings/general/graphql/mutations/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L248
mutation_name = 'organization_update.mutation.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L289
base_input_path = 'organizations/users/graphql/mutations/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/organizations.rb#L291
mutation_name = 'organization_user_update.mutation.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/project.rb#L16
writeable_forks_query_path = 'vue_shared/components/web_ide/get_writable_forks.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L78
base_input_path = 'usage_quotas/storage/project/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L80
query_name = 'project_storage.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L149
base_input_path = 'access_tokens/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L151
query_name = 'get_projects.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L173
base_input_path = 'projects/your_work/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L174
input_query_name = 'user_projects.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L196
base_input_path = 'projects/your_work/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L197
input_query_name = 'projects.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L217
base_input_path = 'projects/your_work/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L218
input_query_name = 'projects.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L243
base_input_path = 'projects/your_work/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L244
input_query_name = 'user_projects.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L267
base_input_path = 'projects/your_work/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L268
input_query_name = 'projects.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L293
base_input_path = 'projects/your_work/graphql/queries/'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/projects.rb#L295
query_name = 'project_counts.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/releases.rb#L147
all_releases_query_path = 'releases/graphql/queries/all_releases.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/releases.rb#L148
one_release_query_path = 'releases/graphql/queries/one_release.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/frontend/fixtures/releases.rb#L149
one_release_for_editing_query_path = 'releases/graphql/queries/one_release_for_editing.query.graphql'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/graphql/types/container_registry/container_repository_details_type_spec.rb#L6
fields = %i[id name path location created_at updated_at expiration_policy_started_at ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/graphql/types/container_registry/container_repository_referrer_type_spec.rb#L6
fields = %i[artifact_type digest user_permissions]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/graphql/types/container_registry/container_repository_tag_type_spec.rb#L6
fields = %i[name path location digest revision short_revision ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/graphql/types/container_registry/container_repository_type_spec.rb#L8
fields = %i[id name path location created_at updated_at expiration_policy_started_at ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/graphql/types/custom_emoji_type_spec.rb#L6
expected_fields = %w[ ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/environments_helper_spec.rb#L8
folder_name = 'env_folder'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/icons_helper_spec.rb#L34
icon_name = 'clock'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/icons_helper_spec.rb#L80
non_existing = 'non_existing_icon_sprite'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/profiles_helper_spec.rb#L83
error_message = 'Key type is forbidden. Must be DSA, ECDSA, or ED25519'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/projects_helper_spec.rb#L1078
project_path = '/project/path'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/projects_helper_spec.rb#L1079
project_forks_path = '/project/forks'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/projects_helper_spec.rb#L1080
project_new_fork_path = '/project/new/fork'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/projects_helper_spec.rb#L1081
user_fork_url = '/user/fork'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/search_helper_spec.rb#L952
mock_created_sort = [ ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/users_helper_spec.rb#L551
confirm_admin_user_path = '/admin/users/root/confirm'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/visibility_level_helper_spec.rb#L10
public_vis = Gitlab::VisibilityLevel::PUBLIC

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/visibility_level_helper_spec.rb#L11
internal_vis = Gitlab::VisibilityLevel::INTERNAL

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/helpers/visibility_level_helper_spec.rb#L12
private_vis = Gitlab::VisibilityLevel::PRIVATE

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L27
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L40
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L53
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L68
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L81
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L94
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L108
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L133
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L151
image = File.binread('spec/fixtures/rails_sample.jpg')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L153
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L177
image = File.binread('spec/fixtures/rails_sample.jpg')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/initializers/mail_encoding_patch_spec.rb#L179
email = Mail.new do ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/banzai/pipeline/ascii_doc_pipeline_spec.rb#L52
input = <<~ADOC

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/audit/auditor_spec.rb#L163
additional_details = { action: :custom, from: false, to: true }

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/audit/auditor_spec.rb#L209
target_details = "this is my target details"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/auth/dpop_token_user_spec.rb#L120
jwk_private_key = JWT::JWK.new(OpenSSL::PKey::RSA.generate(2048))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/auth_spec.rb#L1269
wrong_password = 'incorrect_password'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/background_migration/batched_migration_spec.rb#L178
valid_status = [:paused, :active, :finished, :failed, :finalizing, :finalized]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/background_migration/batched_migration_wrapper_spec.rb#L152
error = StandardError.new

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/tables_locker_spec.rb#L240
gitlab_main_partition = "#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}.zoekt_tasks_test_partition"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/tables_locker_spec.rb#L244
gitlab_main_detached_partition = "#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}._test_gitlab_main_part_20220101"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/tables_locker_spec.rb#L258
gitlab_main_partition = "#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}.zoekt_tasks_test_partition"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/tables_locker_spec.rb#L261
gitlab_main_detached_partition = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/tables_locker_spec.rb#L287
gitlab_main_partition = "#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}.zoekt_tasks_test_partition"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/tables_locker_spec.rb#L291
gitlab_main_detached_partition = "#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}._test_gitlab_main_part_20220101"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/tables_locker_spec.rb#L303
gitlab_main_partition = "#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}.zoekt_tasks_test_partition"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/database/tables_locker_spec.rb#L306
gitlab_main_detached_partition = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/git/repository_spec.rb#L1034
options = { follow: false }

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/git/repository_spec.rb#L1074
options = { after: Time.iso8601('2014-03-03T20:15:01+00:00') }

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/git/repository_spec.rb#L1087
options = { before: Time.iso8601('2014-03-03T20:15:01+00:00') }

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/github_import/client_spec.rb#L904
expected_graphql = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/import_export/attributes_permitter_spec.rb#L169
additional_attributes = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/regex_spec.rb#L144
example = "section_start:1600445393032:NAME\r\033\[0K"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/relative_positioning/item_context_spec.rb#L13
range = (101..107) # A deliberately small range, so we can test everything

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/relative_positioning/mover_spec.rb#L17
range = (101..105)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/relative_positioning/range_spec.rb#L8
item_a = position_struct.new(100, :x, true)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/relative_positioning/range_spec.rb#L9
item_b = position_struct.new(200, :y, true)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/tree_summary_spec.rb#L111
custom_files = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/usage/metrics/instrumentations/count_deployments_metric_spec.rb#L29
time_frame = params[:time_frame]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/gitlab/usage/metrics/instrumentations/count_deployments_metric_spec.rb#L30
type = params[:type]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/omni_auth/strategies/jwt_spec.rb#L39
ecdsa_named_curves = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/lib/sidebars/user_profile/panel_spec.rb#L6
legacy_menu_classes = [ ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/mailers/emails/projects_spec.rb#L270
errors =  ['Some error']

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/migrations/update_kustomization_api_version_spec.rb#L13
old_version_path = 'https://cluster.kustomize.toolkit.fluxcd.io/v1beta1/foo'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/migrations/update_kustomization_api_version_spec.rb#L14
new_version_path = 'https://cluster.kustomize.toolkit.fluxcd.io/v1/foo'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/models/ci/build_spec.rb#L6023
method = "job_artifacts_#{type}"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/models/concerns/cache_markdown_field_spec.rb#L320
message = Struct.new(:text)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/models/error_tracking/project_error_tracking_setting_spec.rb#L229
msg = 'something'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/models/packages/package_spec.rb#L506
plan_limit_name = if pt == 'generic' ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/models/postgresql/replication_slot_spec.rb#L73
skip_examples = described_class.max_replication_slots <= described_class.count

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/models/project_daily_statistic_spec.rb#L67
first_call_stubbed = true

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/models/user_spec.rb#L365
field_name = prefix ? :"#{prefix}_#{field}" : field

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/models/work_items/widgets/description_spec.rb#L78
expected_status = { completed_count: 1, count: 3 }

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/graphql/metadata_query_spec.rb#L89
feature_flags_field = <<~NODE

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/graphql/mutations/ml/models/create_spec.rb#L42
err_msg = "Name should be unique in the project"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/graphql/mutations/releases/create_spec.rb#L361
expected_error_message = Gitlab::Graphql::Authorize::AuthorizeResource::RESOURCE_ACCESS_ERROR

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/graphql/mutations/releases/update_spec.rb#L232
expected_error_message = Gitlab::Graphql::Authorize::AuthorizeResource::RESOURCE_ACCESS_ERROR

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/graphql/mutations/repositories/branches/create_spec.rb#L46
err_msg = 'Failed to create branch \'another_branch\': invalid reference name \'unknown\''

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/integrations_spec.rb#L71
integration = params[:integration]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/integrations_spec.rb#L517
integration = params[:integration]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/maven_packages_spec.rb#L150
expected_status_code = not_found_response

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/maven_packages_spec.rb#L153
expected_status_code = :unauthorized if params[:sent_using] == :custom_header && !params[:valid]

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/repositories_spec.rb#L702
new_branch_name = 'feature-test'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/api/statistics_spec.rb#L7
tables_to_analyze = %w[ ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/projects/google_cloud/gcp_regions_controller_spec.rb#L94
unconfigured_google_oauth2 = Struct.new(:app_id, :app_secret) ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/requests/user_activity_spec.rb#L10
paths_to_visit = [ ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/gitlab/documentation_links/link_spec.rb#L85
offense_message = "The anchor `#this-anchor-does-not-exist` was not found in [...]"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_assignment_spec.rb#L8
offense_call_single_quotes_key = %(ENV['FOO'] = 'bar')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_assignment_spec.rb#L9
offense_call_double_quotes_key = %(ENV["FOO"] = 'bar')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_mocking_spec.rb#L8
offense_call_brackets_string_quotes = %(allow(ENV).to receive(:[]).with('FOO').and_return('bar'))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_mocking_spec.rb#L9
offense_call_brackets_variables = %(allow(ENV).to receive(:[]).with(key).and_return(value))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_mocking_spec.rb#L11
offense_call_fetch_string_quotes = %(allow(ENV).to receive(:fetch).with('FOO').and_return('bar'))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_mocking_spec.rb#L12
offense_call_fetch_variables = %(allow(ENV).to receive(:fetch).with(key).and_return(value))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_mocking_spec.rb#L14
offense_call_root_env_variables = %(allow(::ENV).to receive(:[]).with(key).and_return(value))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_mocking_spec.rb#L15
offense_call_key_value_method_calls = ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/env_mocking_spec.rb#L18
acceptable_mocking_other_methods = %(allow(ENV).to receive(:foo).with("key").and_return("value"))

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb#L10
namespaced_forbidden_method = "#{namespace}#{forbidden_method}"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/factory_bot/avoid_create_spec.rb#L10
namespaced_forbidden_method = "#{namespace}#{forbidden_method}(:user)"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/factory_bot/strategy_in_callback_spec.rb#L10
namespaced_forbidden_method = "#{namespace}#{forbidden_method}(:ci_job_artifact, :archive)"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/redundant_metatag_type_spec.rb#L15
space = " " * type_start

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/redundant_metatag_type_spec.rb#L17
msg = format(message_template, value: value)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/redundant_metatag_type_spec.rb#L18
caret = "^" * (type_end - type_start)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/rubocop/cop/rspec/redundant_metatag_type_spec.rb#L19
corrected = code.sub(/, #{type_regexp}/, '')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/serializers/build_details_entity_spec.rb#L171
invalid_name = 'XSS<a href=# data-disable-with="<img src=x onerror=alert(document.domain)>">'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/services/ci/pipeline_triggers/create_service_spec.rb#L79
error_text = format(_("must be before %{expiry_date}"), expiry_date: max_expiry_date)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/services/packages/nuget/extract_metadata_file_service_spec.rb#L21
expected_metadata = <<~XML.squish

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/services/projects/container_repository/third_party/cleanup_tags_service_spec.rb#L231
original_size = 7

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/services/projects/container_repository/third_party/cleanup_tags_service_spec.rb#L232
keep_n = 1

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/helpers/user_with_namespace_shim.rb#L59
spec_file = UserWithNamespaceShim.get_spec_file

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/features/variable_list_pagination_shared_examples.rb#L4
first_page_count = 20

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/lib/gitlab/sql/set_operator_shared_examples.rb#L4
operator_keyword = operator_keyword.upcase

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/lib/gitlab/usage_data_counters/a_redis_counter_shared_examples.rb#L13
event_count = 5

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/models/concerns/from_set_operator_shared_examples.rb#L4
from_set_operator_concern = described_class

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/models/concerns/from_set_operator_shared_examples.rb#L5
operator_keyword = sql_klass.operator_keyword

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/models/concerns/from_set_operator_shared_examples.rb#L6
operator_method = "from_#{sql_klass.operator_keyword.downcase}"

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/models/disable_sti_shared_examples.rb#L8
skip_sti_check = Gitlab::Utils.to_boolean(ENV['SKIP_STI_CHECK'], default: false)

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/models/jsonb_column_validation_shared_example.rb#L49
jsonb_columns = \ ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/requests/api/debian_distributions_shared_examples.rb#L18
and_body = body.nil? ? '' : ' and expected body'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/requests/api/debian_distributions_shared_examples.rb#L50
and_body = body.nil? ? '' : ' and expected body'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/requests/api/debian_distributions_shared_examples.rb#L80
and_body = body.nil? ? '' : ' and expected body'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/requests/api/debian_packages_shared_examples.rb#L18
and_body = body.nil? ? '' : ' and expected body'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/requests/api/debian_packages_shared_examples.rb#L62
and_body = body.nil? ? '' : ' and expected body'

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/requests/api/time_tracking_shared_examples.rb#L20
issuable_collection_name = issuable_name.pluralize

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/services/issuable/discussions_list_shared_examples.rb#L9
internal_discussions *= 2

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/services/issuable/discussions_list_shared_examples.rb#L10
total_discussions *= 2

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/services/jira/requests/base_shared_examples.rb#L35
config_docs_link_url = Rails.application.routes.url_helpers.help_page_path('integration/jira/configure.md')

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support/shared_examples/services/migrate_to_ghost_user_service_shared_examples.rb#L4
record_class_name = record_class.to_s.titleize.downcase

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/support_specs/database/duplicate_indexes_spec.rb#L6
index_class = ActiveRecord::ConnectionAdapters::IndexDefinition

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/tasks/gitlab/db_rake_spec.rb#L846
table_metadata = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/tasks/gitlab/db_rake_spec.rb#L854
view_metadata = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/tasks/gitlab/db_rake_spec.rb#L886
table_metadata = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/tasks/gitlab/db_rake_spec.rb#L894
view_metadata = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/uploaders/import_export_uploader_spec.rb#L41
patterns = { ...

# https://github.com/gitlabhq/gitlabhq/blob/968c4dc256a5434e7c2d8c054a9598b79a388a25/spec/validators/array_members_validator_spec.rb#L8
child_class = Class.new

# https://github.com/ruby-grape/grape/blob/49e8e63d23e8ba29a60406beb938a6cd1ef3f678/spec/grape/api_spec.rb#L588
verbs = %w[post get head delete put options patch]

# https://github.com/ruby-grape/grape/blob/49e8e63d23e8ba29a60406beb938a6cd1ef3f678/spec/grape/validations/params_scope_spec.rb#L1246
a_decl, a_opts, b_opts = combination

# https://github.com/ruby-grape/grape/blob/49e8e63d23e8ba29a60406beb938a6cd1ef3f678/spec/grape/validations/params_scope_spec.rb#L1246
a_decl, a_opts, b_opts = combination

# https://github.com/ruby-grape/grape/blob/49e8e63d23e8ba29a60406beb938a6cd1ef3f678/spec/grape/validations/params_scope_spec.rb#L1246
a_decl, a_opts, b_opts = combination

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/execution/multiplex_spec.rb#L222
unhandled_err_json = '{}'

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/schema/input_object_spec.rb#L777
input_object = InputObjectDigTest::TestInput2.new( ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/schema/input_object_spec.rb#L820
input_object = InputObjectPatternTest::TestInput2.new( ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/schema_spec.rb#L290
query_type = Class.new(GraphQL::Schema::Object) do ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb#L356
from_error = { ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb#L363
to_error = { ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb#L370
bubbling_error = { ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/fields_will_merge_spec.rb#L979
signature = (1..20).map { |n| "$arg#{n}: PetCommand" }.join(', ')

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/fields_will_merge_spec.rb#L980
fields = (1..20).map { |n| "doesKnowCommand(dogCommand: $arg#{n})" }.join(" ")

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/input_object_names_are_unique_spec.rb#L15
duplicate_input_field_error =  { ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb#L25
missing_required_field_error = { ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb#L35
missing_source_error = { ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb#L46
missing_order_by_direction_error = { ...

# https://github.com/rmosolgo/graphql-ruby/blob/68f160f064c50f73e221bd42d5b71e74b22a3a14/spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb#L57
missing_order_by_direction_index_one_error = { ...

# https://github.com/tootsuite/mastodon/blob/591df1f205c654381203b56d46498efc62370776/spec/lib/mastodon/redis_configuration_spec.rb#L76
prefix = prefix ? "#{prefix}_" : ''

# https://github.com/pry/pry/blob/80816f596774d00afdc81a555724b0819bf26782/spec/indent_spec.rb#L317
test = File.read("spec/fixtures/example_nesting.rb")

# https://github.com/pry/pry/blob/80816f596774d00afdc81a555724b0819bf26782/spec/indent_spec.rb#L320
result = line.split("#").last.strip

# https://github.com/pry/pry/blob/80816f596774d00afdc81a555724b0819bf26782/spec/pry_defaults_spec.rb#L3
_version = 1

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/agent/logging_spec.rb#L171
argv = (onetime_daemonize_args + [log_level_args, log_dest_args]).flatten.compact

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/provider/file/windows_spec.rb#L35
sids = { ...

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/provider/file/windows_spec.rb#L76
is_idempotent = testcase[:is_idempotent].nil? || testcase[:is_idempotent]

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/provider/file/windows_spec.rb#L135
both_system_testcase = { :create_owner => :system, :create_group => :system, :manifest_mode => '660', :actual_mode => '770', :is_idempotent => false }

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/type/file_spec.rb#L1712
test_cmd = '/bin/test'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/type/file_spec.rb#L1714
test_cmd = '/usr/bin/test'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/type/file_spec.rb#L1718
stat_cmd = "stat -f '%Lp'"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/type/file_spec.rb#L1720
stat_cmd = "stat --format=%a"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/integration/type/package_spec.rb#L108
provider_class = Puppet::Type.type(:package).provider(:gem)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/lib/puppet_spec/language.rb#L8
calledFrom = caller

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/lib/puppet_spec/language.rb#L60
calledFrom = caller

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/documentation_on_faces.rb#L24
setter = "#{getter}=".to_sym

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/documentation_on_faces.rb#L41
multiline_text = "with\nnewlines"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/documentation_on_faces.rb#L56
indent = ' ' * length

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/documentation_on_faces.rb#L128
authors = %w{John Paul George Ringo}

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/path_parameters.rb#L34
data = path_types.collect { |k, v| set.member?(k) ? v : nil } .compact

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/path_parameters.rb#L41
reject = true

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/path_parameters.rb#L43
reject = false

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/things_that_declare_options.rb#L69
input = option + argument

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/shared_behaviours/things_that_declare_options.rb#L86
base = %w{--foo -f}

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/functions/strftime_spec.rb#L17
ctor_arg = "{#{field}=>3}"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/functions/strftime_spec.rb#L50
ctor_arg = "{#{field}=>3000}"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/proxy_spec.rb#L11
host, port, user, password = 'some.host', 1234, 'user1', 'pAssw0rd'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/proxy_spec.rb#L11
host, port, user, password = 'some.host', 1234, 'user1', 'pAssw0rd'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/proxy_spec.rb#L11
host, port, user, password = 'some.host', 1234, 'user1', 'pAssw0rd'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/proxy_spec.rb#L11
host, port, user, password = 'some.host', 1234, 'user1', 'pAssw0rd'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/proxy_spec.rb#L239
no_proxy = '127.0.0.1, localhost'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/http/proxy_spec.rb#L261
no_proxy = '127.0.0.1, localhost, mydomain.com, *.otherdomain.com, oddport.com:8080, *.otheroddport.com:8080, .anotherdomain.com, .anotheroddport.com:8080'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/indirector/file_bucket_file/file_spec.rb#L256
trailing_string = trailing_slash ? '/' : ''

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/interface/option_spec.rb#L10
input = base + postfix

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_spec.rb#L484
dirname = "lib"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_spec.rb#L486
dirname = "facts.d"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/module_spec.rb#L488
dirname = filetype.to_s

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/pops/evaluator/arithmetic_ops_spec.rb#L141
encoded = Base64.encode64('Hello world').chomp

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/pops/loaders/loaders_spec.rb#L338
case_number = from_idx * 3 + called_idx + 1

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/pops/types/ruby_generator_spec.rb#L280
loader = nil

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/pops/types/ruby_generator_spec.rb#L421
module_def = nil

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/pops/types/ruby_generator_spec.rb#L588
typeset = nil

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/pops/types/ruby_generator_spec.rb#L733
module_def = nil

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/property/ensure_spec.rb#L5
klass = Puppet::Property::Ensure

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/property/list_spec.rb#L5
list_class = Puppet::Property::List

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/provider/exec/posix_spec.rb#L155
locale_sentinel_env = {}

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/provider/exec/posix_spec.rb#L158
command = "/bin/echo $%s"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/provider/exec/posix_spec.rb#L191
user_sentinel_env = {}

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/provider/exec/posix_spec.rb#L194
command = "/bin/echo $%s"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/provider/exec_spec.rb#L32
command = base_command + args

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/provider/package/pip_spec.rb#L4
pip_path_with_spaces = 'C:\Program Files (x86)\Python\Scripts\pip.exe'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/provider_spec.rb#L458
defaultforspec = { ...

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/type/component_spec.rb#L3
component = Puppet::Type.type(:component)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/type/exec_spec.rb#L269
expect = %w{one two three four}

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/type/file/checksum_spec.rb#L3
checksum = Puppet::Type.type(:file).attrclass(:checksum)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/type/file/selinux_spec.rb#L4
property = Puppet::Type.type(:file).attrclass(param)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/type/resources_spec.rb#L14
resources = Puppet::Type.type(:resources)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/type/schedule_spec.rb#L56
period = period.to_sym

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/type/tidy_spec.rb#L4
tidy = Puppet::Type.type(:tidy)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/type/whit_spec.rb#L3
whit = Puppet::Type.type(:whit)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/checksums_spec.rb#L12
content_sums = [:md5, :md5lite, :sha1, :sha1lite, :sha256, :sha256lite, :sha512, :sha384, :sha224]

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/checksums_spec.rb#L13
file_only = [:ctime, :mtime, :none]

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/execution_spec.rb#L515
get_env_var_cmd = 'echo $%s'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/execution_spec.rb#L519
lang_sentinel_value = "en_US.UTF-8"

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/execution_spec.rb#L522
locale_sentinel_env = {}

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/execution_spec.rb#L588
get_env_var_cmd = 'echo $%s'

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/execution_spec.rb#L595
user_sentinel_env = {}

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/package/version/pip_spec.rb#L15
version = described_class.parse(input_version)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/package/version/pip_spec.rb#L44
valid_version = described_class.parse("1.0")

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/package/version/pip_spec.rb#L397
versions = [ ...

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/package/version/pip_spec.rb#L448
lower_version = described_class.parse(version_pair.first)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/package/version/pip_spec.rb#L449
greater_version = described_class.parse(version_pair.last)

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/eventlog_spec.rb#L96
log_levels_to_type_and_id = { ...

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L117
final_state = Puppet::Util::Windows::Service::FINAL_STATES[pending_state]

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L213
invalid_initial_states = Puppet::Util::Windows::Service::SERVICE_STATES.keys - valid_initial_states - [final_state]

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L238
unsafe_pending_state = unsafe_pending_states.first

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L341
service = Puppet::Util::Windows::Service

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L342
valid_initial_states = [ ...

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L347
final_state = service::SERVICE_RUNNING

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L397
service = Puppet::Util::Windows::Service

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L398
valid_initial_states = service::SERVICE_STATES.keys - [service::SERVICE_STOPPED]

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L399
final_state = service::SERVICE_STOPPED

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L449
service = Puppet::Util::Windows::Service

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L450
valid_initial_states = [ ...

# https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/spec/unit/util/windows/service_spec.rb#L455
final_state = service::SERVICE_RUNNING

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/bisect/shell_runner_spec.rb#L40
open3_method = Open3.respond_to?(:capture2e) ? :capture2e : :popen3

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/bisect/shell_runner_spec.rb#L41
open3_method = :popen3 if RSpec::Support::Ruby.jruby?

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/dsl_spec.rb#L3
main = self

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/example_execution_result_spec.rb#L89
fetch_not_found_error_class = defined?(::KeyError) ? ::KeyError : ::IndexError

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/example_group_constants_spec.rb#L5
file_in_outer_group = File

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/example_group_constants_spec.rb#L10
file_in_inner_group = File

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/example_spec.rb#L240
description_line = __LINE__ + 3

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters/exception_presenter_spec.rb#L35
line_num = __LINE__ + 1

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters/exception_presenter_spec.rb#L40
line_num = __LINE__ + 1

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters/exception_presenter_spec.rb#L183
caused_by_line_num = __LINE__ + 1

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters/exception_presenter_spec.rb#L674
line = __LINE__

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters/helpers_spec.rb#L4
helper = described_class

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters/profile_formatter_spec.rb#L15
example_line_number = nil

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters_spec.rb#L51
formatter_class = Struct.new(:output)

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters_spec.rb#L79
formatter_class = Struct.new(:output)

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters_spec.rb#L148
plain_old_formatter = Class.new do ...

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters_spec.rb#L168
specific_formatter = RSpec::Core::Formatters::JsonFormatter

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/formatters_spec.rb#L169
generic_formatter = specific_formatter.superclass

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/metadata_spec.rb#L391
value_from = lambda do |group| ...

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/notifications_spec.rb#L14
exception_line = __LINE__ + 1

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/rake_task_spec.rb#L35
default_load_path_opts = '-I\S+'

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/suite_hooks_spec.rb#L6
type = registration_method.to_s.split('_').last

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core/world_spec.rb#L164
another_file = File.join(__FILE__, "another_spec_file.rb")

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core_spec.rb#L4
fake_libs = File.expand_path('../../support/fake_libs', __FILE__)

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core_spec.rb#L5
allowed_loaded_features = [ ...

# https://github.com/rspec/rspec-core/blob/aec5f49485d97908183dbe790a7fefb8baaa8091/spec/rspec/core_spec.rb#L19
disable_autorun_code = ...

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/expectations/expectation_target_spec.rb#L87
not_a_block_matcher_error = /You must pass an argument rather than a block to `expect` to use the provided matcher/

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/expectations_spec.rb#L4
allowed_loaded_features = [ ...

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/built_in/change_spec.rb#L5
value_pattern = /(?:result|`.+?`)/

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/built_in/compound_spec.rb#L100
obj = Object.new

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/built_in/has_spec.rb#L35
obj_with_block_method = Object.new

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/built_in/start_and_end_with_spec.rb#L57
struct = Struct.new(:foo)

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/built_in/start_and_end_with_spec.rb#L79
my_struct = Struct.new(:id, :fluff) do ...

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/built_in/start_and_end_with_spec.rb#L265
struct = Struct.new(:foo)

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/built_in/start_and_end_with_spec.rb#L287
my_struct = Struct.new(:id, :fluff) do ...

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/dsl_spec.rb#L220
line = __LINE__ - 3

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/dsl_spec.rb#L241
line = __LINE__ - 3

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/dsl_spec.rb#L261
line = __LINE__ - 3

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/dsl_spec.rb#L280
line = __LINE__ - 3

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/dsl_spec.rb#L1158
mod = Module.new do ...

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/legacy_spec.rb#L10
matcher = matcher_class.new

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/legacy_spec.rb#L13
backwards_compat_matcher = Class.new(matcher_class) do ...

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/legacy_spec.rb#L83
matcher_class = Class.new do ...

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers/legacy_spec.rb#L93
matcher_class = Class.new do ...

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers_spec.rb#L1
main = self

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers_spec.rb#L33
matcher_method = :output

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/rspec/matchers_spec.rb#L36
matcher_method = :avoid_outputting

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/spec_helper.rb#L135
original_value = RSpec::Expectations.configuration.warn_about_potential_false_positives?

# https://github.com/rspec/rspec-expectations/blob/ba31727e856de42abb5a2e6566855f0831e1a619/spec/support/shared_examples/block_matcher.rb#L7
options = options.first || {}

# https://github.com/rspec/rspec-mocks/blob/3caa9ac841e146d618421f870077c0ad684e6cad/spec/rspec/mocks/standalone_spec.rb#L2
main = self

# https://github.com/rspec/rspec-mocks/blob/3caa9ac841e146d618421f870077c0ad684e6cad/spec/rspec/mocks/verifying_doubles/method_visibility_spec.rb#L14
method_name = :"defined_#{visibility}_method"

# https://github.com/rspec/rspec-mocks/blob/3caa9ac841e146d618421f870077c0ad684e6cad/spec/rspec/mocks/verifying_doubles/method_visibility_spec.rb#L58
method_name = :"defined_#{visibility}_class_method"

# https://github.com/rspec/rspec-mocks/blob/3caa9ac841e146d618421f870077c0ad684e6cad/spec/rspec/mocks_spec.rb#L4
lib_preamble = [ ...

# https://github.com/rspec/rspec-mocks/blob/3caa9ac841e146d618421f870077c0ad684e6cad/spec/support/before_all_shared_example_group.rb#L2
the_error = nil

# https://github.com/rspec/rspec-rails/blob/b80f752e136707671503e8253cb0ee782432067c/spec/rspec/rails/configuration_spec.rb#L24
default_value = opts[:default]

# https://github.com/rspec/rspec-rails/blob/b80f752e136707671503e8253cb0ee782432067c/spec/rspec/rails/configuration_spec.rb#L25
alias_setting = opts[:alias_with]

# https://github.com/rspec/rspec-rails/blob/b80f752e136707671503e8253cb0ee782432067c/spec/rspec/rails/configuration_spec.rb#L26
predicate_method = "#{accessor}?".to_sym

# https://github.com/rspec/rspec-rails/blob/b80f752e136707671503e8253cb0ee782432067c/spec/rspec/rails/configuration_spec.rb#L27
command_method = "#{accessor}=".to_sym

# https://github.com/rspec/rspec-rails/blob/b80f752e136707671503e8253cb0ee782432067c/spec/sanity_check_spec.rb#L5
tmp_root = Pathname.new(RSpec::Core::RubyProject.root).join("tmp")

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/project_spec.rb#L12
version_regexp = /\A\d+\.\d+\z|\A<<next>>\z/

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/project_spec.rb#L312
dir = File.expand_path('../changelog', __dir__)

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cli/options_spec.rb#L1113
regex = /Finished in [0-9]*\.[0-9]* seconds/

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/internal_affairs/node_first_or_last_argument_spec.rb#L6
correction_source = "#{receiver}#{dot}#{position}_argument"

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/lint/ambiguous_assignment_spec.rb#L5
operator = mistake[1]

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/lint/unused_method_argument_spec.rb#L342
(foo_message, bar_message) = %w[foo bar].map do |arg|

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/lint/unused_method_argument_spec.rb#L342
(foo_message, bar_message) = %w[foo bar].map do |arg|

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/and_or_spec.rb#L5
cop_config = { 'EnforcedStyle' => 'conditionals' }

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/and_or_spec.rb#L148
cop_config = { 'EnforcedStyle' => 'always' }

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/block_delimiters_spec.rb#L199
cop_config = { ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/block_delimiters_spec.rb#L561
cop_config = { ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/block_delimiters_spec.rb#L912
cop_config = { ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/block_delimiters_spec.rb#L1100
cop_config = { ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/block_delimiters_spec.rb#L1265
cop_config = { 'EnforcedStyle' => 'line_count_based', 'BracesRequiredMethods' => %w[sig] }

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/collection_methods_spec.rb#L4
cop_config = { ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/format_string_token_spec.rb#L59
template  = '%{template}'

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/format_string_token_spec.rb#L60
annotated = "%<named>#{token}"

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/format_string_token_spec.rb#L62
template_to_annotated = '%<template>s'

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/format_string_token_spec.rb#L63
annotated_to_template = '%{named}'

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/global_vars_spec.rb#L4
cop_config = { 'AllowedVariables' => ['$allowed'] }

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/if_unless_modifier_spec.rb#L20
extra = ' Another good alternative is the usage of control flow `&&`/`||`.'

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/redundant_regexp_escape_spec.rb#L470
l, r = delims.chars

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/redundant_regexp_escape_spec.rb#L470
l, r = delims.chars

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/redundant_regexp_escape_spec.rb#L471
r = l if r.nil?

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/redundant_regexp_escape_spec.rb#L472
escaped_delims = "\\#{l}\\#{r}"

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/select_by_regexp_spec.rb#L5
message = "Prefer `#{correction}` to `#{method}` with a regexp match."

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/select_by_regexp_spec.rb#L268
message = "Prefer `#{correction}` to `#{method}` with a regexp match."

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/select_by_regexp_spec.rb#L345
message = "Prefer `#{correction}` to `#{method}` with a regexp match."

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/select_by_regexp_spec.rb#L416
message = "Prefer `#{correction}` to `#{method}` with a regexp match."

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/select_by_regexp_spec.rb#L450
message = "Prefer `#{correction}` to `#{method}` with a regexp match."

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/select_by_regexp_spec.rb#L521
message = "Prefer `#{correction}` to `#{method}` with a regexp match."

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/select_by_regexp_spec.rb#L553
message = "Prefer `#{correction}` to `#{method}` with a regexp match."

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/cop/style/select_by_regexp_spec.rb#L579
message = "Prefer `#{correction}` to `#{method}` with a regexp match."

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/formatter/formatter_set_spec.rb#L6
win_close = lambda do |fset| ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/formatter/html_formatter_spec.rb#L4
spec_root = File.expand_path('../..', __dir__)

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/formatter/markdown_formatter_spec.rb#L4
spec_root = File.expand_path('../..', __dir__)

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/magic_comment_spec.rb#L5
encoding = expectations[:encoding]

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/magic_comment_spec.rb#L6
frozen_string = expectations[:frozen_string_literal]

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/magic_comment_spec.rb#L7
shareable_constant_value = expectations[:shareable_constant_value]

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/magic_comment_spec.rb#L8
typed = expectations[:typed]

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/target_finder_spec.rb#L6
ruby_extensions = %w[.rb ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/target_finder_spec.rb#L32
ruby_interpreters = %w[ruby macruby rake jruby rbx]

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/rubocop/target_finder_spec.rb#L34
ruby_filenames = %w[.irbrc ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/support/alignment_examples.rb#L6
config_to_allow_offenses = if used_style ...

# https://github.com/rubocop-hq/rubocop/blob/3432c6d939312cb88ad3e18226f8e7a20214bbdb/spec/support/alignment_examples.rb#L13
source = chunk.lines.grep_v(/^ *\^/).join

# https://github.com/rubytoolbox/rubytoolbox/blob/838b08bc6ba30adad41526421e6d87c8cb30376d/spec/jobs/rubygems_sync_job_spec.rb#L10
fake_gem = Struct.new(:name)

# https://github.com/rubytoolbox/rubytoolbox/blob/838b08bc6ba30adad41526421e6d87c8cb30376d/spec/models/project/order_spec.rb#L61
default_direction = described_class::DEFAULT_DIRECTIONS.first

# https://github.com/rubytoolbox/rubytoolbox/blob/838b08bc6ba30adad41526421e6d87c8cb30376d/spec/models/project/order_spec.rb#L77
expected_groups = described_class::DEFAULT_DIRECTIONS.map(&:group).uniq

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/i18n/community_backend_spec.rb#L15
default_locales = [:en, :fi]

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L29
order_created = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L62
payment_review = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L117
auth_created = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L159
auth_created_no_order = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L214
payment_voided = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L261
payment_voided_no_order = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L308
payment_completed = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L349
commission_paid = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L398
commission_pending_ext = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L448
payment_refunded = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L488
payment_refunded_2 = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L532
billing_agreement_created = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L581
payment_pending_ext = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L626
payment_denied = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L671
payment_completed_2 = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L722
authorization_expired = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/data_types/ipn_spec.rb#L769
authorization_expired_no_order = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/store/paypal_payment_spec.rb#L4
order = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/store/paypal_payment_spec.rb#L16
auth_created = {:type=>:authorization_created, ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/store/paypal_payment_spec.rb#L31
voided = { ...

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/services/paypal_service/store/paypal_refund_spec.rb#L2
payment_id = "3JA47865AL1892125"

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/view_utils/new_layout_view_utils_spec.rb#L22
person_id = "xyz"

# https://github.com/sharetribe/sharetribe/blob/b634b7067710e3893aca868663b5daeabe7c377d/spec/view_utils/new_layout_view_utils_spec.rb#L23
community_id = 123

next unless part_of_example_scope?(reference)
next if permitted_argument?(reference)

add_offense(assignment.node)
Copy link
Contributor Author

@lovro-bikic lovro-bikic Aug 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I added the offense to the reference node, but that created offense noise (if an offending variable is referenced many times, there will be many offenses). An offense on the assignment node reduces that noise, but it may not be clear which reference triggered the offense. Let me know what you think is the better option.

Here's an example:

   user = create(:user)
#  ^^^^^^^^^^^^^^^^^^^^ assignment offense (only one)

   before do
     user.update(admin: true)
#    ^^^^ reference offense
     user.flag!
#    ^^^^ reference offense (repeated for all references)
   end

@lovro-bikic lovro-bikic force-pushed the leaky-local-variable-cop branch from 2db2779 to 1c78177 Compare August 3, 2025 11:31
@lovro-bikic lovro-bikic force-pushed the leaky-local-variable-cop branch from 1c78177 to c791895 Compare August 3, 2025 12:18
@pirj
Copy link
Member

pirj commented Aug 3, 2025

The problem is not the variable, but a call to factory outside of the example, made outside of the example lifecycle.

Variables come handy at times, because you can’t reasonably use constants (see LeakyConstant).
In the report, apart from the use of Time.now.to_i inside string interpolation, the rest looks totally harmless. Am I missing something?

Would you agree to re-target the cop to catch those out-of-scope factory calls?

@lovro-bikic
Copy link
Contributor Author

lovro-bikic commented Aug 3, 2025

The problem is not the variable, but a call to factory outside of the example, made outside of the example lifecycle.

I agree that that's a problem, but I don't think it's the problem. A local variable that's not a call to a factory can still be equally problematic, e.g.:

foo = 'string'

it 'does something' do
  foo << 'modification'

  expect(foo).to eq('stringmodification')
end

it 'does something else' do
  expect(foo).to eq('string') # this example can fail depending on the example order
end

I would agree that some examples in there are harmless, but a lot of them are unnecessarily made local variables. To give a few examples:

Most of the examples in the report follow this pattern. Also, despite being harmless, I think that let is still preferable because it's lazily evaluated and not shared between examples. I haven't gone through all the examples in the report while developing the cop, but true positives far outweigh the false ones from what I saw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cop idea: prevent closure variables
2 participants