Skip to content

Commit

Permalink
Start addons names from "addons-" prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
extsoft committed Nov 24, 2017
1 parent 08b78ee commit 7d0e6dc
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 25 deletions.
8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ Unit tests
Addons
------
Add the following line to the test file if the extension is required:
- `load commons` to have the working test (**mandatory**)
- `load addons-common` to have the working test (**mandatory**)
- `load addons-git` to interact with real git repository (**optional**)
- `load fake-cd` to fake `cd` unix command (**optional**)
- `load fake-read` to fake `read` unix command (**optional**)

@todo #89 Use some name template for the addons.
- `load addons-cd` to fake `cd` unix command (**optional**)
- `load addons-read` to fake `read` unix command (**optional**)

Bats restrictions
-----------------
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/test/git-elegant-add.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats

load commons
load fake-read
load addons-common
load addons-read

setup() {
fake-pass git "ls-files -m" src/test/git-elegant
Expand Down
2 changes: 1 addition & 1 deletion src/test/git-elegant-check.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

load commons
load addons-common
load addons-git

preconditions() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/git-elegant-clear-local.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats -ex

load commons
load fake-read
load addons-common
load addons-read

setup() {
fake-pass git "branch -lvv" "first [gone]"
Expand Down
6 changes: 3 additions & 3 deletions src/test/git-elegant-clone.bats
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bats -ex

load commons
load fake-read
load fake-cd
load addons-common
load addons-read
load addons-cd

setup() {
fake-pass git clone
Expand Down
4 changes: 2 additions & 2 deletions src/test/git-elegant-configure.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats

load commons
load fake-read
load addons-common
load addons-read

setup() {
fake-pass git "elegant commands"
Expand Down
2 changes: 1 addition & 1 deletion src/test/git-elegant-feature.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats -ex

load commons
load addons-common

setup() {
fake-pass git "elegant pull master"
Expand Down
4 changes: 2 additions & 2 deletions src/test/git-elegant-init.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats

load commons
load fake-read
load addons-common
load addons-read

setup() {
fake-pass git init
Expand Down
2 changes: 1 addition & 1 deletion src/test/git-elegant-pull.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

load commons
load addons-common

@test "exit code is 0 when run 'git-elegant pull' without parameters" {
fake-pass git "fetch --tags"
Expand Down
4 changes: 2 additions & 2 deletions src/test/git-elegant-push-after-rebase.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats -ex

load commons
load fake-read
load addons-common
load addons-read

setup() {
fake-pass git "elegant rebase"
Expand Down
4 changes: 2 additions & 2 deletions src/test/git-elegant-push.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats

load commons
load fake-read
load addons-common
load addons-read

setup() {
fake-pass git branch *master
Expand Down
2 changes: 1 addition & 1 deletion src/test/git-elegant-rebase.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

load commons
load addons-common

setup() {
fake-pass git "fetch --tags"
Expand Down
2 changes: 1 addition & 1 deletion src/test/git-elegant.bats
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bats

load commons
load addons-common

@test "print available commands when run 'git-elegant commands'" {
run git-elegant commands
Expand Down

1 comment on commit 7d0e6dc

@0pdd
Copy link

@0pdd 0pdd commented on 7d0e6dc Nov 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 89-27642c68 disappeared from CONTRIBUTING.md, that's why I closed #97.

Please sign in to comment.