Merge branch 'kigster-tests-must-work' into upstream_master
commit
cab3cf998b
|
|
@ -9,13 +9,14 @@ load ../../lib/helpers
|
||||||
|
|
||||||
NO_COLOR=true
|
NO_COLOR=true
|
||||||
|
|
||||||
IS_DARWIN=
|
|
||||||
[[ "$(uname -s)" == "Darwin" ]] && IS_DARWIN=true
|
|
||||||
|
|
||||||
@test "helpers search aliases" {
|
@test "helpers search aliases" {
|
||||||
if [ -z "$IS_DARWIN" ]; then
|
|
||||||
skip 'search test only runs on OSX'
|
|
||||||
fi
|
|
||||||
run _bash-it-search-component 'plugins' 'base'
|
run _bash-it-search-component 'plugins' 'base'
|
||||||
[[ "${lines[0]}" =~ 'plugins' && "${lines[0]}" =~ 'base' ]]
|
[[ "${lines[0]}" =~ 'plugins' && "${lines[0]}" =~ 'base' ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "helpers search all ruby et al" {
|
||||||
|
run _bash-it-search 'ruby' 'gem' 'bundle' 'rake' 'rails'
|
||||||
|
[[ "${lines[0]}" == 'aliases : bundler rails' ]]
|
||||||
|
[[ "${lines[1]}" == 'plugins : chruby chruby-auto ruby' ]]
|
||||||
|
[[ "${lines[2]}" == 'completions : bundler gem rake' ]]
|
||||||
|
}
|
||||||
|
|
|
||||||
15
test/run
15
test/run
|
|
@ -1,5 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
_TEST_DIR="$(cd "$(dirname "$0")" && pwd)"
|
test_directory="$(cd "$(dirname "$0")" && pwd)"
|
||||||
_BATS="${_TEST_DIR}/../bats/bin/bats"
|
bats_executable="${test_directory}/../bats/bin/bats"
|
||||||
[ ! -e $_BATS ] && git clone --depth 1 https://github.com/sstephenson/bats.git ${_TEST_DIR}/../bats
|
|
||||||
exec $_BATS ${CI:+--tap} ${_TEST_DIR}/{lib,plugins}
|
[ ! -e $bats_executable ] && \
|
||||||
|
git clone --depth 1 https://github.com/sstephenson/bats.git ${test_directory}/../bats
|
||||||
|
|
||||||
|
if [ -z "${BASH_IT}" ]; then
|
||||||
|
export BASH_IT=$(cd ${test_directory} && dirname $(pwd))
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec $bats_executable ${CI:+--tap} ${test_directory}/{lib,plugins}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue