1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-12-26 14:39:46 +01:00

Test load

This commit is contained in:
Sam Stephenson 2011-12-28 21:41:23 -06:00
parent 43d1972b0e
commit a4c16fecef
3 changed files with 13 additions and 0 deletions

View File

@ -67,3 +67,8 @@ teardown() {
run cat "$TMP/teardown.log" run cat "$TMP/teardown.log"
[ ${#lines[@]} -eq 3 ] [ ${#lines[@]} -eq 3 ]
} }
@test "load sources scripts relative to the current test file" {
run bats "$FIXTURE_ROOT/load.bats"
[ $status -eq 0 ]
}

5
test/fixtures/load.bats vendored Normal file
View File

@ -0,0 +1,5 @@
load test_helper
@test "calling a loaded helper" {
help_me
}

3
test/fixtures/test_helper.bash vendored Normal file
View File

@ -0,0 +1,3 @@
help_me() {
true
}