Skip to content

Commit 5e7c387

Browse files
committed
Install bashunit beta
1 parent 5d8fa97 commit 5e7c387

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

example-bashunit/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DEFAULT_PATH=tests

example-bashunit/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# More details about bashunit installation #
55
# see: https://bashunit.typeddevs.com/installation #
66
####################################################
7-
curl -s https://bashunit.typeddevs.com/install.sh | bash -s lib 0.10.0
7+
curl -s https://bashunit.typeddevs.com/install.sh | bash -s lib beta

example-bashunit/test.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
#!/bin/bash
22

3-
# Set project root as the working directory
4-
cd "$(dirname "$0")"
5-
6-
export PROJECT_DIR="$(realpath ".")"
7-
export SRC="${PROJECT_DIR}/src"
8-
9-
lib/bashunit tests/*_test.sh
10-
3+
lib/bashunit tests

example-bashunit/tests/unit_test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
# setUp is called before executing each test function
4-
function setUp() {
5-
source "${SRC}/ice_cream_price.sh"
3+
# set_up is called before executing each test function
4+
function set_up() {
5+
source "$(realpath ".")/src/ice_cream_price.sh"
66
}
77

88
function test_ice_cream_price_should_be_100_per_portion_for_low_quantities() {

0 commit comments

Comments
 (0)