grayhemp / bats-mock

Mocking for Bats
The Unlicense
43 stars 10 forks source link

If first mock argument is an echo parameter is not captured. #14

Open dampcake opened 3 years ago

dampcake commented 3 years ago

Given:

@test "my test" {
  my_mock="$(mock_create)"

  "${my_mock}" -n -e arguments

  [ "$(mock_get_call_args "${my_mock}")" = "-n -e arguments" ]
}

I would expect this to work. Unfortunately the arguments captured are just arguments.