Skip to content

add bats-assert and bats-file plugins to bats test suite #536

Closed
@MichaelDimmitt

Description

@MichaelDimmitt

I created a request in bats-core to add homebrew support for their plugins using homebrew taps.

bats-core/bats-core#492

In the meantime,
https://github.com/bats-core/bats-assert

Refers to
https://github.com/ztombol/bats-docs

Which uses the homebrew tap from kaos
https://github.com/kaos/homebrew-shell

$ brew tap kaos/shell
$ brew install bats-assert
$ brew install bats-file

then in every test you have to load the files.

load '/opt/homebrew/lib/bats-support/load.bash'
load '/opt/homebrew/lib/bats-assert/load.bash'

@test 'refute_output()' {
  run echo 'want'
  refute_output 'want'
}
@test 'assert_equal()' {
  assert_equal 'have' 'hav'
}

Screen Shot 2021-08-26 at 8 57 52 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions