mirror of
https://github.com/sstephenson/bats.git
synced 2024-12-26 14:39:46 +01:00
Test load
This commit is contained in:
parent
43d1972b0e
commit
a4c16fecef
|
@ -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
5
test/fixtures/load.bats
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
load test_helper
|
||||||
|
|
||||||
|
@test "calling a loaded helper" {
|
||||||
|
help_me
|
||||||
|
}
|
3
test/fixtures/test_helper.bash
vendored
Normal file
3
test/fixtures/test_helper.bash
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
help_me() {
|
||||||
|
true
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user