diff --git a/tests/functional/doubles_test.sh b/tests/functional/doubles_test.sh deleted file mode 100644 index 82780983..00000000 --- a/tests/functional/doubles_test.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -function test_mock_ps_when_executing_a_script() { - skip "The mock is not been able to cat the output of the cat" - return - mock ps cat ./tests/functional/fixtures/doubles_ps_output - - assert_match_snapshot "$(./tests/functional/fixtures/doubles_script.sh)" -} - -function test_mock_ps_when_executing_a_sourced_function() { - skip "The mock is not been able to cat the output of the cat" - return - source ./tests/functional/fixtures/doubles_function.sh - mock ps cat ./tests/functional/fixtures/doubles_ps_output - - assert_match_snapshot "$(top_mem)" -} - -function test_spy_commands_called_once_when_executing_a_script() { - skip "not working while executing commands outside a function" - return - - spy ps - spy awk - spy head - - ./tests/functional/fixtures/doubles_script.sh - - assert_have_been_called_times 1 ps - assert_have_been_called_times 1 awk - assert_have_been_called_times 1 head -} - -function test_spy_commands_called_once_when_executing_a_sourced_function() { - skip "The spies can not spy inside the scope of the function" - return - - source ./tests/functional/fixtures/doubles_function.sh - spy ps - spy awk - spy head - - top_mem - - assert_have_been_called_times 1 ps - assert_have_been_called_times 1 awk - assert_have_been_called_times 1 head -}