forked from cleveragents/cleveragents-core
50 lines
2.0 KiB
Gherkin
50 lines
2.0 KiB
Gherkin
Feature: Scripts functionality
|
|
Test the utility scripts in the scripts directory
|
|
|
|
Scenario: Install script runs command
|
|
Given I have a mock subprocess module
|
|
When I run the install script
|
|
Then the install script should call pip install for base dependencies
|
|
And the install script should call pip install for dev dependencies
|
|
And the install script should call pip install for test dependencies
|
|
And the install script should call pip install for docs dependencies
|
|
|
|
Scenario: Install script handles command execution
|
|
Given I have a mock subprocess module
|
|
When I execute run_command with a test command
|
|
Then subprocess.run should be called with the correct arguments
|
|
|
|
Scenario: Sync script updates pip
|
|
Given I have a mock subprocess module
|
|
And I have a mock pathlib module
|
|
When I run the sync script
|
|
Then the sync script should update pip
|
|
And the sync script should generate requirements files
|
|
|
|
Scenario: Sync script handles pip freeze
|
|
Given I have a mock subprocess module with successful freeze
|
|
And I have a mock pathlib module
|
|
When I run the sync script
|
|
Then the requirements.txt file should be created with freeze output
|
|
|
|
Scenario: Sync script handles pip freeze failure
|
|
Given I have a mock subprocess module with failed freeze
|
|
And I have a mock pathlib module
|
|
When I run the sync script
|
|
Then the requirements.txt file should not be created
|
|
|
|
Scenario: Do-something shell script executes
|
|
Given I have the do-something.sh script
|
|
When I execute the do-something.sh script
|
|
Then the script output should contain "This script does a thing"
|
|
|
|
Scenario: Install script main entry point
|
|
Given I have a mock subprocess module
|
|
When I execute the install script as main
|
|
Then the install script should have run successfully
|
|
|
|
Scenario: Sync script main entry point
|
|
Given I have a mock subprocess module
|
|
And I have a mock pathlib module
|
|
When I execute the sync script as main
|
|
Then the sync script should have run successfully |