-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some tests for installer, and CLI context.
- Loading branch information
1 parent
113b85a
commit e85df13
Showing
5 changed files
with
217 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Feature: CLI Context | ||
In order to write new CLI commands | ||
As a developer | ||
I need to be able to test CLI commands | ||
|
||
Scenario: Create a test file in a temporary directory | ||
Given I am in a temporary directory | ||
When I run "touch test.txt" | ||
And I run "ls" | ||
Then I should get: | ||
""" | ||
test.txt | ||
""" | ||
Then I should not get: | ||
""" | ||
Makefile | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Feature: Install drumkit | ||
In order to use drumkit's features | ||
As a Drupal developer | ||
I need to be able to install drumkit easily | ||
|
||
Scenario: Fail if installer is not running in the root of a git repo | ||
Given I am in a temporary directory | ||
Then executing "scripts/install.sh" should fail | ||
And I should get: | ||
""" | ||
ERROR: This script must be run at the root of a git repository. | ||
""" | ||
|
||
@debug | ||
Scenario: Succeed if installer is running in the root of a git repo | ||
Given I am in a temporary directory | ||
And I run "git init" | ||
And I execute "scripts/install.sh" | ||
Then I should not get: | ||
""" | ||
ERROR: This script must be run at the root of a git repository. | ||
""" | ||
And the following files should exist: | ||
""" | ||
Makefile | ||
.mk/Makefile | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
echoerr() { echo "$@" 1>&2; } | ||
|
||
if [[ ! -d .git ]]; then | ||
echoerr "ERROR: This script must be run at the root of a git repository." | ||
exit 1 | ||
fi | ||
|
||
git submodule add https://github.com/ergonlogic/drumkit .mk | ||
echo "include .mk/Makefile" > Makefile |