diff --git a/test/bats.bats b/test/bats.bats index 8b9d42d..5f5b510 100755 --- a/test/bats.bats +++ b/test/bats.bats @@ -21,15 +21,23 @@ FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures" } @test "one passing test" { - run bats "$FIXTURE_ROOT/one_passing.bats" + run bats "$FIXTURE_ROOT/passing.bats" [ $status -eq 0 ] [ ${lines[0]} = "1..1" ] [ ${lines[1]} = "ok 1 a passing test" ] } @test "one failing test" { - run bats "$FIXTURE_ROOT/one_failing.bats" + run bats "$FIXTURE_ROOT/failing.bats" [ $status -eq 1 ] [ ${lines[0]} = "1..1" ] [ ${lines[1]} = "not ok 1 a failing test" ] } + +@test "one failing and one passing test" { + run bats "$FIXTURE_ROOT/failing_and_passing.bats" + [ $status -eq 1 ] + [ ${lines[0]} = "1..2" ] + [ ${lines[1]} = "not ok 1 a failing test" ] + [ ${lines[2]} = "ok 2 a passing test" ] +} diff --git a/test/fixtures/one_failing.bats b/test/fixtures/failing.bats similarity index 100% rename from test/fixtures/one_failing.bats rename to test/fixtures/failing.bats diff --git a/test/fixtures/failing_and_passing.bats b/test/fixtures/failing_and_passing.bats new file mode 100644 index 0000000..5513a9b --- /dev/null +++ b/test/fixtures/failing_and_passing.bats @@ -0,0 +1,7 @@ +@test "a failing test" { + false +} + +@test "a passing test" { + true +} diff --git a/test/fixtures/one_passing.bats b/test/fixtures/passing.bats similarity index 100% rename from test/fixtures/one_passing.bats rename to test/fixtures/passing.bats