Skip to content

Commit a57a59e

Browse files
committed
test: remove duplicated test_spy_commands_called_once_when_executing_a_sourced_function
1 parent 5acce04 commit a57a59e

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

tests/functional/doubles_test.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,3 @@ function test_mock_ps_when_executing_a_sourced_function() {
1212

1313
assert_match_snapshot "$(top_mem)"
1414
}
15-
16-
function test_spy_commands_called_once_when_executing_a_sourced_function() {
17-
18-
source ./tests/functional/fixtures/doubles_function.sh
19-
spy ps
20-
spy awk
21-
spy head
22-
23-
top_mem
24-
25-
assert_have_been_called_times 1 ps
26-
assert_have_been_called_times 1 awk
27-
assert_have_been_called_times 1 head
28-
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
22

33
function top_mem() {
4-
ps -eo cmd,%mem --sort=-%mem | awk '$2 >= 1.0 {print $0}' | head -n 3
4+
ps | awk '$2 >= 1.0 {print $0}' | head -n 3
55
}

0 commit comments

Comments
 (0)