Skip to content

Commit 78e146c

Browse files
committed
ref(test): rename find_total_tests fixtures to avoid test runner discovery
Rename *_test.sh/*.bash to *_fixture.sh/.bash so the runner doesn't pick them up as real tests and flag them as risky.
1 parent 8af0db9 commit 78e146c

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

tests/unit/fixtures/find_total_tests/provider_test.sh renamed to tests/unit/fixtures/find_total_tests/provider_fixture.sh

File renamed without changes.

tests/unit/fixtures/find_total_tests/simple_test.bash renamed to tests/unit/fixtures/find_total_tests/simple_fixture.bash

File renamed without changes.
File renamed without changes.

tests/unit/helpers_test.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -292,39 +292,39 @@ function test_find_total_tests_no_files() {
292292

293293
function test_find_total_tests_simple_file() {
294294
local file
295-
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_test.sh"
295+
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_fixture.sh"
296296

297297
assert_same "2" "$(helpers_test::find_total_in_subshell "" "$file")"
298298
}
299299

300300
function test_find_total_tests_simple_file_bash() {
301301
local file
302-
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_test.bash"
302+
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_fixture.bash"
303303

304304
assert_same "2" "$(helpers_test::find_total_in_subshell "" "$file")"
305305
}
306306

307307
function test_find_total_tests_with_provider() {
308308
local file
309-
file="$(bashunit::current_dir)/fixtures/find_total_tests/provider_test.sh"
309+
file="$(bashunit::current_dir)/fixtures/find_total_tests/provider_fixture.sh"
310310

311311
assert_same "3" "$(helpers_test::find_total_in_subshell "" "$file")"
312312
}
313313

314314
function test_find_total_tests_multiple_files() {
315315
local file1
316316
local file2
317-
file1="$(bashunit::current_dir)/fixtures/find_total_tests/simple_test.sh"
318-
file2="$(bashunit::current_dir)/fixtures/find_total_tests/provider_test.sh"
317+
file1="$(bashunit::current_dir)/fixtures/find_total_tests/simple_fixture.sh"
318+
file2="$(bashunit::current_dir)/fixtures/find_total_tests/provider_fixture.sh"
319319

320320
assert_same "5" "$(helpers_test::find_total_in_subshell "" "$file1" "$file2")"
321321
}
322322

323323
function test_find_total_tests_with_filter() {
324324
local file1
325325
local file2
326-
file1="$(bashunit::current_dir)/fixtures/find_total_tests/simple_test.sh"
327-
file2="$(bashunit::current_dir)/fixtures/find_total_tests/provider_test.sh"
326+
file1="$(bashunit::current_dir)/fixtures/find_total_tests/simple_fixture.sh"
327+
file2="$(bashunit::current_dir)/fixtures/find_total_tests/provider_fixture.sh"
328328

329329
assert_same "3" "$(helpers_test::find_total_in_subshell "with_provider" "$file1" "$file2")"
330330
}
@@ -387,28 +387,28 @@ function test_parse_file_path_filter_with_colon_in_path() {
387387

388388
function test_find_function_at_line_first_function() {
389389
local file
390-
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_test.sh"
390+
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_fixture.sh"
391391

392392
assert_same "test_first" "$(bashunit::helper::find_function_at_line "$file" 4)"
393393
}
394394

395395
function test_find_function_at_line_second_function() {
396396
local file
397-
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_test.sh"
397+
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_fixture.sh"
398398

399399
assert_same "test_second" "$(bashunit::helper::find_function_at_line "$file" 8)"
400400
}
401401

402402
function test_find_function_at_line_exact_function_line() {
403403
local file
404-
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_test.sh"
404+
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_fixture.sh"
405405

406406
assert_same "test_first" "$(bashunit::helper::find_function_at_line "$file" 3)"
407407
}
408408

409409
function test_find_function_at_line_before_any_function() {
410410
local file
411-
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_test.sh"
411+
file="$(bashunit::current_dir)/fixtures/find_total_tests/simple_fixture.sh"
412412

413413
assert_same "" "$(bashunit::helper::find_function_at_line "$file" 1)"
414414
}

0 commit comments

Comments
 (0)