Skip to content

Commit 35ce281

Browse files
authored
Merge pull request #414 from CosmeValera/main
Typo "to has been called"
2 parents 5aa58f6 + 6d0bd75 commit 35ce281

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- Fix typo "to has been called"
6+
37
## [0.20.0](https://github.com/TypedDevs/bashunit/compare/0.19.1...0.20.0) - 2025-06-01
48

59
- Fix asserts on test doubles in subshell

src/test_doubles.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function assert_have_been_called() {
7676

7777
if [[ $times -eq 0 ]]; then
7878
state::add_assertions_failed
79-
console_results::print_failed_test "${label}" "${command}" "to has been called" "once"
79+
console_results::print_failed_test "${label}" "${command}" "to have been called" "once"
8080
return
8181
fi
8282

@@ -134,7 +134,7 @@ function assert_have_been_called_times() {
134134
if [[ $times -ne $expected ]]; then
135135
state::add_assertions_failed
136136
console_results::print_failed_test "${label}" "${command}" \
137-
"to has been called" "${expected} times" \
137+
"to have been called" "${expected} times" \
138138
"actual" "${times} times"
139139
return
140140
fi

tests/unit/test_doubles_test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function test_unsuccessful_spy_called() {
4141
spy ps
4242

4343
assert_same\
44-
"$(console_results::print_failed_test "Unsuccessful spy called" "ps" "to has been called" "once")"\
44+
"$(console_results::print_failed_test "Unsuccessful spy called" "ps" "to have been called" "once")"\
4545
"$(assert_have_been_called ps)"
4646
}
4747

@@ -63,7 +63,7 @@ function test_unsuccessful_spy_called_times() {
6363

6464
assert_same\
6565
"$(console_results::print_failed_test "Unsuccessful spy called times" "ps" \
66-
"to has been called" "1 times" \
66+
"to have been called" "1 times" \
6767
"actual" "2 times")"\
6868
"$(assert_have_been_called_times 1 ps)"
6969
}
@@ -90,7 +90,7 @@ function test_unsuccessful_spy_with_source_function_have_been_called() {
9090
"$(console_results::print_failed_test \
9191
"Unsuccessful spy with source function have been called"\
9292
"function_to_be_spied_on" \
93-
"to has been called" "1 times" \
93+
"to have been called" "1 times" \
9494
"actual" "2 times")"\
9595
"$(assert_have_been_called_times 1 function_to_be_spied_on)"
9696
}
@@ -161,7 +161,7 @@ function test_spy_unsuccessful_not_called() {
161161

162162
assert_same \
163163
"$(console_results::print_failed_test "Spy unsuccessful not called" "ps" \
164-
"to has been called" "0 times" \
164+
"to have been called" "0 times" \
165165
"actual" "1 times")" \
166166
"$(assert_not_called ps)"
167167
}

0 commit comments

Comments
 (0)