producer-core/features/test_file.feature
2014-07-18 12:23:17 +00:00

22 lines
541 B
Gherkin

@sshd
Feature: `file?' condition keyword
Background:
Given a recipe with:
"""
task :file_test do
condition { file? 'some_file' }
echo 'evaluated'
end
"""
Scenario: succeeds when file exists
Given a remote file named "some_file"
When I successfully execute the recipe on remote target
Then the output must contain "evaluated"
Scenario: fails when file does not exist
When I successfully execute the recipe on remote target
Then the output must not contain "evaluated"