How to use include method of Runners Package

Best Test-prof_ruby code snippet using Runners.include

runners_spec.rb

Source:runners_spec.rb Github

copy

Full Screen

...30 context 'authorized user' do31 it 'returns response status and headers' do32 get api('/runners', user)33 expect(response).to have_gitlab_http_status(:ok)34 expect(response).to include_pagination_headers35 end36 it 'returns user available runners' do37 get api('/runners', user)38 expect(json_response).to match_array [39 a_hash_including('description' => 'Project runner'),40 a_hash_including('description' => 'Two projects runner'),41 a_hash_including('description' => 'Group runner A'),42 a_hash_including('description' => 'Group runner B')43 ]44 end45 it 'filters runners by scope' do46 create(:ci_runner, :project, :inactive, description: 'Inactive project runner', projects: [project])47 get api('/runners?scope=paused', user)48 expect(response).to have_gitlab_http_status(:ok)49 expect(response).to include_pagination_headers50 expect(json_response).to match_array [51 a_hash_including('description' => 'Inactive project runner')52 ]53 end54 it 'avoids filtering if scope is invalid' do55 get api('/runners?scope=unknown', user)56 expect(response).to have_gitlab_http_status(:bad_request)57 end58 it 'filters runners by type' do59 get api('/runners?type=project_type', user)60 expect(json_response).to match_array [61 a_hash_including('description' => 'Project runner'),62 a_hash_including('description' => 'Two projects runner')63 ]64 end65 it 'does not filter by invalid type' do66 get api('/runners?type=bogus', user)67 expect(response).to have_gitlab_http_status(:bad_request)68 end69 it 'filters runners by status' do70 create(:ci_runner, :project, :inactive, description: 'Inactive project runner', projects: [project])71 get api('/runners?status=paused', user)72 expect(json_response).to match_array [73 a_hash_including('description' => 'Inactive project runner')74 ]75 end76 it 'does not filter by invalid status' do77 get api('/runners?status=bogus', user)78 expect(response).to have_gitlab_http_status(:bad_request)79 end80 it 'filters runners by tag_list' do81 create(:ci_runner, :project, description: 'Runner tagged with tag1 and tag2', projects: [project], tag_list: %w[tag1 tag2])82 create(:ci_runner, :project, description: 'Runner tagged with tag2', projects: [project], tag_list: ['tag2'])83 get api('/runners?tag_list=tag1,tag2', user)84 expect(json_response).to match_array [85 a_hash_including('description' => 'Runner tagged with tag1 and tag2')86 ]87 end88 end89 context 'unauthorized user' do90 it 'does not return runners' do91 get api('/runners')92 expect(response).to have_gitlab_http_status(:unauthorized)93 end94 end95 end96 describe 'GET /runners/all' do97 context 'authorized user' do98 context 'with admin privileges' do99 it 'returns response status and headers' do100 get api('/runners/all', admin)101 expect(response).to have_gitlab_http_status(:ok)102 expect(response).to include_pagination_headers103 end104 it 'returns all runners' do105 get api('/runners/all', admin)106 expect(json_response).to match_array [107 a_hash_including('description' => 'Project runner'),108 a_hash_including('description' => 'Two projects runner'),109 a_hash_including('description' => 'Group runner A'),110 a_hash_including('description' => 'Group runner B'),111 a_hash_including('description' => 'Shared runner')112 ]113 end114 it 'filters runners by scope' do115 get api('/runners/all?scope=shared', admin)116 shared = json_response.all? { |r| r['is_shared'] }117 expect(response).to have_gitlab_http_status(:ok)118 expect(response).to include_pagination_headers119 expect(json_response).to be_an Array120 expect(json_response[0]).to have_key('ip_address')121 expect(shared).to be_truthy122 end123 it 'filters runners by scope' do124 get api('/runners/all?scope=specific', admin)125 expect(response).to have_gitlab_http_status(:ok)126 expect(response).to include_pagination_headers127 expect(json_response).to match_array [128 a_hash_including('description' => 'Project runner'),129 a_hash_including('description' => 'Two projects runner'),130 a_hash_including('description' => 'Group runner A'),131 a_hash_including('description' => 'Group runner B')132 ]133 end134 it 'avoids filtering if scope is invalid' do135 get api('/runners/all?scope=unknown', admin)136 expect(response).to have_gitlab_http_status(:bad_request)137 end138 it 'filters runners by project type' do139 get api('/runners/all?type=project_type', admin)140 expect(json_response).to match_array [141 a_hash_including('description' => 'Project runner'),142 a_hash_including('description' => 'Two projects runner')143 ]144 end145 it 'filters runners by group type' do146 get api('/runners/all?type=group_type', admin)147 expect(json_response).to match_array [148 a_hash_including('description' => 'Group runner A'),149 a_hash_including('description' => 'Group runner B')150 ]151 end152 it 'does not filter by invalid type' do153 get api('/runners/all?type=bogus', admin)154 expect(response).to have_gitlab_http_status(:bad_request)155 end156 it 'filters runners by status' do157 create(:ci_runner, :project, :inactive, description: 'Inactive project runner', projects: [project])158 get api('/runners/all?status=paused', admin)159 expect(json_response).to match_array [160 a_hash_including('description' => 'Inactive project runner')161 ]162 end163 it 'does not filter by invalid status' do164 get api('/runners/all?status=bogus', admin)165 expect(response).to have_gitlab_http_status(:bad_request)166 end167 it 'filters runners by tag_list' do168 create(:ci_runner, :project, description: 'Runner tagged with tag1 and tag2', projects: [project], tag_list: %w[tag1 tag2])169 create(:ci_runner, :project, description: 'Runner tagged with tag2', projects: [project], tag_list: ['tag2'])170 get api('/runners/all?tag_list=tag1,tag2', admin)171 expect(json_response).to match_array [172 a_hash_including('description' => 'Runner tagged with tag1 and tag2')173 ]174 end175 end176 context 'without admin privileges' do177 it 'does not return runners list' do178 get api('/runners/all', user)179 expect(response).to have_gitlab_http_status(:forbidden)180 end181 end182 end183 context 'unauthorized user' do184 it 'does not return runners' do185 get api('/runners')186 expect(response).to have_gitlab_http_status(:unauthorized)187 end188 end189 end190 describe 'GET /runners/:id' do191 context 'admin user' do192 context 'when runner is shared' do193 it "returns runner's details" do194 get api("/runners/#{shared_runner.id}", admin)195 expect(response).to have_gitlab_http_status(:ok)196 expect(json_response['description']).to eq(shared_runner.description)197 expect(json_response['maximum_timeout']).to be_nil198 end199 end200 context 'when runner is not shared' do201 context 'when unused runner is present' do202 let!(:unused_project_runner) { create(:ci_runner, :project, :without_projects) }203 it 'deletes unused runner' do204 expect do205 delete api("/runners/#{unused_project_runner.id}", admin)206 expect(response).to have_gitlab_http_status(:no_content)207 end.to change { Ci::Runner.project_type.count }.by(-1)208 end209 end210 it "returns runner's details" do211 get api("/runners/#{project_runner.id}", admin)212 expect(response).to have_gitlab_http_status(:ok)213 expect(json_response['description']).to eq(project_runner.description)214 end215 it "returns the project's details for a project runner" do216 get api("/runners/#{project_runner.id}", admin)217 expect(json_response['projects'].first['id']).to eq(project.id)218 end219 end220 it 'returns 404 if runner does not exists' do221 get api('/runners/0', admin)222 expect(response).to have_gitlab_http_status(:not_found)223 end224 end225 context "runner project's administrative user" do226 context 'when runner is not shared' do227 it "returns runner's details" do228 get api("/runners/#{project_runner.id}", user)229 expect(response).to have_gitlab_http_status(:ok)230 expect(json_response['description']).to eq(project_runner.description)231 end232 end233 context 'when runner is shared' do234 it "returns runner's details" do235 get api("/runners/#{shared_runner.id}", user)236 expect(response).to have_gitlab_http_status(:ok)237 expect(json_response['description']).to eq(shared_runner.description)238 end239 end240 end241 context 'other authorized user' do242 it "does not return project runner's details" do243 get api("/runners/#{project_runner.id}", user2)244 expect(response).to have_gitlab_http_status(:forbidden)245 end246 end247 context 'unauthorized user' do248 it "does not return project runner's details" do249 get api("/runners/#{project_runner.id}")250 expect(response).to have_gitlab_http_status(:unauthorized)251 end252 end253 context 'FF hide_token_from_runners_api is enabled' do254 before do255 stub_feature_flags(hide_token_from_runners_api: true)256 end257 it "does not return runner's token" do258 get api("/runners/#{shared_runner.id}", admin)259 expect(response).to have_gitlab_http_status(:ok)260 expect(json_response).not_to have_key('token')261 end262 end263 context 'FF hide_token_from_runners_api is disabled' do264 before do265 stub_feature_flags(hide_token_from_runners_api: false)266 end267 it "returns runner's token" do268 get api("/runners/#{shared_runner.id}", admin)269 expect(response).to have_gitlab_http_status(:ok)270 expect(json_response).to have_key('token')271 end272 end273 end274 describe 'PUT /runners/:id' do275 context 'admin user' do276 # see https://gitlab.com/gitlab-org/gitlab-foss/issues/48625277 context 'single parameter update' do278 it 'runner description' do279 description = shared_runner.description280 update_runner(shared_runner.id, admin, description: "#{description}_updated")281 expect(response).to have_gitlab_http_status(:ok)282 expect(shared_runner.reload.description).to eq("#{description}_updated")283 end284 it 'runner active state' do285 active = shared_runner.active286 update_runner(shared_runner.id, admin, active: !active)287 expect(response).to have_gitlab_http_status(:ok)288 expect(shared_runner.reload.active).to eq(!active)289 end290 it 'runner tag list' do291 update_runner(shared_runner.id, admin, tag_list: ['ruby2.1', 'pgsql', 'mysql'])292 expect(response).to have_gitlab_http_status(:ok)293 expect(shared_runner.reload.tag_list).to include('ruby2.1', 'pgsql', 'mysql')294 end295 it 'runner untagged flag' do296 # Ensure tag list is non-empty before setting untagged to false.297 update_runner(shared_runner.id, admin, tag_list: ['ruby2.1', 'pgsql', 'mysql'])298 update_runner(shared_runner.id, admin, run_untagged: 'false')299 expect(response).to have_gitlab_http_status(:ok)300 expect(shared_runner.reload.run_untagged?).to be(false)301 end302 it 'runner unlocked flag' do303 update_runner(shared_runner.id, admin, locked: 'true')304 expect(response).to have_gitlab_http_status(:ok)305 expect(shared_runner.reload.locked?).to be(true)306 end307 it 'runner access level' do308 update_runner(shared_runner.id, admin, access_level: 'ref_protected')309 expect(response).to have_gitlab_http_status(:ok)310 expect(shared_runner.reload.ref_protected?).to be_truthy311 end312 it 'runner maximum timeout' do313 update_runner(shared_runner.id, admin, maximum_timeout: 1234)314 expect(response).to have_gitlab_http_status(:ok)315 expect(shared_runner.reload.maximum_timeout).to eq(1234)316 end317 it 'fails with no parameters' do318 put api("/runners/#{shared_runner.id}", admin)319 shared_runner.reload320 expect(response).to have_gitlab_http_status(:bad_request)321 end322 end323 context 'when runner is shared' do324 it 'updates runner' do325 description = shared_runner.description326 active = shared_runner.active327 runner_queue_value = shared_runner.ensure_runner_queue_value328 update_runner(shared_runner.id, admin, description: "#{description}_updated",329 active: !active,330 tag_list: ['ruby2.1', 'pgsql', 'mysql'],331 run_untagged: 'false',332 locked: 'true',333 access_level: 'ref_protected',334 maximum_timeout: 1234)335 shared_runner.reload336 expect(response).to have_gitlab_http_status(:ok)337 expect(shared_runner.description).to eq("#{description}_updated")338 expect(shared_runner.active).to eq(!active)339 expect(shared_runner.tag_list).to include('ruby2.1', 'pgsql', 'mysql')340 expect(shared_runner.run_untagged?).to be(false)341 expect(shared_runner.locked?).to be(true)342 expect(shared_runner.ref_protected?).to be_truthy343 expect(shared_runner.ensure_runner_queue_value)344 .not_to eq(runner_queue_value)345 expect(shared_runner.maximum_timeout).to eq(1234)346 end347 end348 context 'when runner is not shared' do349 it 'updates runner' do350 description = project_runner.description351 runner_queue_value = project_runner.ensure_runner_queue_value352 update_runner(project_runner.id, admin, description: 'test')353 project_runner.reload354 expect(response).to have_gitlab_http_status(:ok)355 expect(project_runner.description).to eq('test')356 expect(project_runner.description).not_to eq(description)357 expect(project_runner.ensure_runner_queue_value)358 .not_to eq(runner_queue_value)359 end360 end361 it 'returns 404 if runner does not exists' do362 update_runner(0, admin, description: 'test')363 expect(response).to have_gitlab_http_status(:not_found)364 end365 def update_runner(id, user, args)366 put api("/runners/#{id}", user), params: args367 end368 end369 context 'authorized user' do370 context 'when runner is shared' do371 it 'does not update runner' do372 put api("/runners/#{shared_runner.id}", user), params: { description: 'test' }373 expect(response).to have_gitlab_http_status(:forbidden)374 end375 end376 context 'when runner is not shared' do377 it 'does not update project runner without access to it' do378 put api("/runners/#{project_runner.id}", user2), params: { description: 'test' }379 expect(response).to have_gitlab_http_status(:forbidden)380 end381 it 'updates project runner with access to it' do382 description = project_runner.description383 put api("/runners/#{project_runner.id}", admin), params: { description: 'test' }384 project_runner.reload385 expect(response).to have_gitlab_http_status(:ok)386 expect(project_runner.description).to eq('test')387 expect(project_runner.description).not_to eq(description)388 end389 end390 end391 context 'unauthorized user' do392 it 'does not delete project runner' do393 put api("/runners/#{project_runner.id}")394 expect(response).to have_gitlab_http_status(:unauthorized)395 end396 end397 end398 describe 'DELETE /runners/:id' do399 context 'admin user' do400 context 'when runner is shared' do401 it 'deletes runner' do402 expect do403 delete api("/runners/#{shared_runner.id}", admin)404 expect(response).to have_gitlab_http_status(:no_content)405 end.to change { Ci::Runner.instance_type.count }.by(-1)406 end407 it_behaves_like '412 response' do408 let(:request) { api("/runners/#{shared_runner.id}", admin) }409 end410 end411 context 'when runner is not shared' do412 it 'deletes used project runner' do413 expect do414 delete api("/runners/#{project_runner.id}", admin)415 expect(response).to have_gitlab_http_status(:no_content)416 end.to change { Ci::Runner.project_type.count }.by(-1)417 end418 end419 it 'returns 404 if runner does not exists' do420 delete api('/runners/0', admin)421 expect(response).to have_gitlab_http_status(:not_found)422 end423 end424 context 'authorized user' do425 context 'when runner is shared' do426 it 'does not delete runner' do427 delete api("/runners/#{shared_runner.id}", user)428 expect(response).to have_gitlab_http_status(:forbidden)429 end430 end431 context 'when runner is not shared' do432 it 'does not delete runner without access to it' do433 delete api("/runners/#{project_runner.id}", user2)434 expect(response).to have_gitlab_http_status(:forbidden)435 end436 it 'does not delete project runner with more than one associated project' do437 delete api("/runners/#{two_projects_runner.id}", user)438 expect(response).to have_gitlab_http_status(:forbidden)439 end440 it 'deletes project runner for one owned project' do441 expect do442 delete api("/runners/#{project_runner.id}", user)443 expect(response).to have_gitlab_http_status(:no_content)444 end.to change { Ci::Runner.project_type.count }.by(-1)445 end446 it 'does not delete group runner with guest access' do447 delete api("/runners/#{group_runner_a.id}", group_guest)448 expect(response).to have_gitlab_http_status(:forbidden)449 end450 it 'does not delete group runner with reporter access' do451 delete api("/runners/#{group_runner_a.id}", group_reporter)452 expect(response).to have_gitlab_http_status(:forbidden)453 end454 it 'does not delete group runner with developer access' do455 delete api("/runners/#{group_runner_a.id}", group_developer)456 expect(response).to have_gitlab_http_status(:forbidden)457 end458 it 'does not delete group runner with maintainer access' do459 delete api("/runners/#{group_runner_a.id}", group_maintainer)460 expect(response).to have_gitlab_http_status(:forbidden)461 end462 it 'deletes owned group runner with owner access' do463 expect do464 delete api("/runners/#{group_runner_a.id}", user)465 expect(response).to have_gitlab_http_status(:no_content)466 end.to change { Ci::Runner.group_type.count }.by(-1)467 end468 it 'deletes inherited group runner with owner access' do469 expect do470 delete api("/runners/#{group_runner_b.id}", user)471 expect(response).to have_gitlab_http_status(:no_content)472 end.to change { Ci::Runner.group_type.count }.by(-1)473 end474 it_behaves_like '412 response' do475 let(:request) { api("/runners/#{project_runner.id}", user) }476 end477 end478 end479 context 'unauthorized user' do480 it 'does not delete project runner' do481 delete api("/runners/#{project_runner.id}")482 expect(response).to have_gitlab_http_status(:unauthorized)483 end484 end485 end486 describe 'GET /runners/:id/jobs' do487 let_it_be(:job_1) { create(:ci_build) }488 let_it_be(:job_2) { create(:ci_build, :running, runner: shared_runner, project: project) }489 let_it_be(:job_3) { create(:ci_build, :failed, runner: shared_runner, project: project) }490 let_it_be(:job_4) { create(:ci_build, :running, runner: project_runner, project: project) }491 let_it_be(:job_5) { create(:ci_build, :failed, runner: project_runner, project: project) }492 context 'admin user' do493 context 'when runner exists' do494 context 'when runner is shared' do495 it 'return jobs' do496 get api("/runners/#{shared_runner.id}/jobs", admin)497 expect(response).to have_gitlab_http_status(:ok)498 expect(response).to include_pagination_headers499 expect(json_response).to be_an(Array)500 expect(json_response.length).to eq(2)501 end502 end503 context 'when runner is specific' do504 it 'return jobs' do505 get api("/runners/#{project_runner.id}/jobs", admin)506 expect(response).to have_gitlab_http_status(:ok)507 expect(response).to include_pagination_headers508 expect(json_response).to be_an(Array)509 expect(json_response.length).to eq(2)510 end511 end512 context 'when valid status is provided' do513 it 'return filtered jobs' do514 get api("/runners/#{project_runner.id}/jobs?status=failed", admin)515 expect(response).to have_gitlab_http_status(:ok)516 expect(response).to include_pagination_headers517 expect(json_response).to be_an(Array)518 expect(json_response.length).to eq(1)519 expect(json_response.first).to include('id' => job_5.id)520 end521 end522 context 'when valid order_by is provided' do523 context 'when sort order is not specified' do524 it 'return jobs in descending order' do525 get api("/runners/#{project_runner.id}/jobs?order_by=id", admin)526 expect(response).to have_gitlab_http_status(:ok)527 expect(response).to include_pagination_headers528 expect(json_response).to be_an(Array)529 expect(json_response.length).to eq(2)530 expect(json_response.first).to include('id' => job_5.id)531 end532 end533 context 'when sort order is specified as asc' do534 it 'return jobs sorted in ascending order' do535 get api("/runners/#{project_runner.id}/jobs?order_by=id&sort=asc", admin)536 expect(response).to have_gitlab_http_status(:ok)537 expect(response).to include_pagination_headers538 expect(json_response).to be_an(Array)539 expect(json_response.length).to eq(2)540 expect(json_response.first).to include('id' => job_4.id)541 end542 end543 end544 context 'when invalid status is provided' do545 it 'return 400' do546 get api("/runners/#{project_runner.id}/jobs?status=non-existing", admin)547 expect(response).to have_gitlab_http_status(:bad_request)548 end549 end550 context 'when invalid order_by is provided' do551 it 'return 400' do552 get api("/runners/#{project_runner.id}/jobs?order_by=non-existing", admin)553 expect(response).to have_gitlab_http_status(:bad_request)554 end555 end556 context 'when invalid sort is provided' do557 it 'return 400' do558 get api("/runners/#{project_runner.id}/jobs?sort=non-existing", admin)559 expect(response).to have_gitlab_http_status(:bad_request)560 end561 end562 end563 context "when runner doesn't exist" do564 it 'returns 404' do565 get api('/runners/0/jobs', admin)566 expect(response).to have_gitlab_http_status(:not_found)567 end568 end569 end570 context "runner project's administrative user" do571 context 'when runner exists' do572 context 'when runner is shared' do573 it 'returns 403' do574 get api("/runners/#{shared_runner.id}/jobs", user)575 expect(response).to have_gitlab_http_status(:forbidden)576 end577 end578 context 'when runner is specific' do579 it 'return jobs' do580 get api("/runners/#{project_runner.id}/jobs", user)581 expect(response).to have_gitlab_http_status(:ok)582 expect(response).to include_pagination_headers583 expect(json_response).to be_an(Array)584 expect(json_response.length).to eq(2)585 end586 end587 context 'when valid status is provided' do588 it 'return filtered jobs' do589 get api("/runners/#{project_runner.id}/jobs?status=failed", user)590 expect(response).to have_gitlab_http_status(:ok)591 expect(response).to include_pagination_headers592 expect(json_response).to be_an(Array)593 expect(json_response.length).to eq(1)594 expect(json_response.first).to include('id' => job_5.id)595 end596 end597 context 'when invalid status is provided' do598 it 'return 400' do599 get api("/runners/#{project_runner.id}/jobs?status=non-existing", user)600 expect(response).to have_gitlab_http_status(:bad_request)601 end602 end603 end604 context "when runner doesn't exist" do605 it 'returns 404' do606 get api('/runners/0/jobs', user)607 expect(response).to have_gitlab_http_status(:not_found)608 end609 end610 end611 context 'other authorized user' do612 it 'does not return jobs' do613 get api("/runners/#{project_runner.id}/jobs", user2)614 expect(response).to have_gitlab_http_status(:forbidden)615 end616 end617 context 'unauthorized user' do618 it 'does not return jobs' do619 get api("/runners/#{project_runner.id}/jobs")620 expect(response).to have_gitlab_http_status(:unauthorized)621 end622 end623 end624 shared_examples_for 'unauthorized access to runners list' do625 context 'authorized user without maintainer privileges' do626 it "does not return group's runners" do627 get api("/#{entity_type}/#{entity.id}/runners", user2)628 expect(response).to have_gitlab_http_status(:forbidden)629 end630 end631 context 'unauthorized user' do632 it "does not return project's runners" do633 get api("/#{entity_type}/#{entity.id}/runners")634 expect(response).to have_gitlab_http_status(:unauthorized)635 end636 end637 end638 describe 'GET /projects/:id/runners' do639 context 'authorized user with maintainer privileges' do640 it 'returns response status and headers' do641 get api('/runners/all', admin)642 expect(response).to have_gitlab_http_status(:ok)643 expect(response).to include_pagination_headers644 end645 it 'returns all runners' do646 get api("/projects/#{project.id}/runners", user)647 expect(json_response).to match_array [648 a_hash_including('description' => 'Project runner'),649 a_hash_including('description' => 'Two projects runner'),650 a_hash_including('description' => 'Shared runner')651 ]652 end653 it 'filters runners by scope' do654 get api("/projects/#{project.id}/runners?scope=specific", user)655 expect(response).to have_gitlab_http_status(:ok)656 expect(response).to include_pagination_headers657 expect(json_response).to match_array [658 a_hash_including('description' => 'Project runner'),659 a_hash_including('description' => 'Two projects runner')660 ]661 end662 it 'avoids filtering if scope is invalid' do663 get api("/projects/#{project.id}/runners?scope=unknown", user)664 expect(response).to have_gitlab_http_status(:bad_request)665 end666 it 'filters runners by type' do667 get api("/projects/#{project.id}/runners?type=project_type", user)668 expect(json_response).to match_array [669 a_hash_including('description' => 'Project runner'),670 a_hash_including('description' => 'Two projects runner')...

Full Screen

Full Screen

include

Using AI Code Generation

copy

Full Screen

1runners.include('Mike')2runners.include('John')3runners.include('John')4runners.include('John')5runners.include('Mike')6runners.include('Mike')7runners.include('Mike')8runners.include('John')9runners.include('John')10runners.include('John')11runners.include('Mike')12runners.include('Mike')13runners.include('Mike')14runners.include('John')15runners.include('John')16runners.include('John')17runners.include('Mike')18runners.include('Mike')19runners.include('Mike')20runners.include('John')21runners.include('John')22runners.include('John')23runners.include('Mike')24runners.include('Mike')25runners.include('Mike')26runners.include('John')27runners.include('John')28runners.include('John')29runners.include('Mike')30runners.include('Mike')31runners.include('Mike')32runners.include('John')33runners.include('John')34runners.include('John')35runners.include('Mike')36runners.include('Mike')37runners.include('Mike')38runners.include('John')39runners.include('John')40runners.include('John')41runners.include('Mike')42runners.include('Mike')43runners.include('Mike')44runners.include('John')45runners.include('John')46runners.include('John')47runners.include('Mike')48runners.include('Mike')49runners.include('Mike')50runners.include('John')51runners.include('John')52runners.include('John')53runners.include('Mike')54runners.include('Mike')55runners.include('Mike')56runners.include('John')57runners.include('John')58runners.include('John')

Full Screen

Full Screen

include

Using AI Code Generation

copy

Full Screen

1runners.add_runner("John")2runners.add_runner("Jane")3runners.add_runner("Joan")4runners.add_runner("Jenny")5runners.add_runner("Jill")6runners.remove_runner("Jane")7runners.remove_runner("Jenny")

Full Screen

Full Screen

include

Using AI Code Generation

copy

Full Screen

1runners.include?("Sally")2runners.include?("Bob")3runners.include?("Cindy")4runners.include?("Tim")5runners.include?("John")6runners.include?("Joe")7runners.include?("Sue")8runners.include?("Jill")9runners.include?("Bill")10runners.include?("Mary")11runners.include?("Sarah")12runners.include?("Sally")13runners.include?("Bob")14runners.include?("Cindy")15runners.include?("Tim")16runners.include?("John")17runners.include?("Joe")18runners.include?("Sue")19runners.include?("Jill")20runners.include?("Bill")21runners.include?("Mary")22runners.include?("Sarah")23runners.include?("Sally")24runners.include?("Bob")25runners.include?("Cindy")26runners.include?("Tim")27runners.include?("John")28runners.include?("Joe")29runners.include?("Sue")30runners.include?("Jill")31runners.include?("Bill")32runners.include?("Mary")33runners.include?("Sarah")34runners.include?("Sally")35runners.include?("Bob")36runners.include?("Cindy")37runners.include?("Tim")38runners.include?("John")39runners.include?("Joe")40runners.include?("Sue")41runners.include?("Jill")42runners.include?("Bill")43runners.include?("Mary")44runners.include?("Sarah")45runners.include?("Sally")46runners.include?("Bob")47runners.include?("Cindy")48runners.include?("Tim")49runners.include?("John")50runners.include?("Joe")51runners.include?("Sue")52runners.include?("Jill")53runners.include?("Bill")54runners.include?("Mary")55runners.include?("Sarah")56runners.include?("Sally")57runners.include?("Bob")58runners.include?("Cindy")59runners.include?("Tim")60runners.include?("John")61runners.include?("Joe")62runners.include?("Sue")63runners.include?("Jill")64runners.include?("Bill")65runners.include?("Mary")66runners.include?("Sarah")67runners.include?("Sally")68runners.include?("Bob")69runners.include?("Cindy")70runners.include?("Tim")71runners.include?("John")72runners.include?("Joe")73runners.include?("Sue")74runners.include?("Jill")75runners.include?("Bill")76runners.include?("Mary")

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Test-prof_ruby automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful