added test/README with small guides about testing framework

pull/440/head
Ivan Povalyukhin 2015-03-28 18:27:11 -07:00
parent 28e5c99816
commit 3c0db284ac
2 changed files with 4 additions and 1 deletions

4
test/README.md 100644
View File

@ -0,0 +1,4 @@
## Testing with [Bats](https://github.com/sstephenson/bats#installing-bats-from-source)
```
bats test/{lib,plugins}
```

View File

@ -9,7 +9,6 @@ load ../../plugins/available/ruby.plugin
assert_line 1 "remove_gem () " assert_line 1 "remove_gem () "
} }
@test "plugins ruby: PATH includes ~/.gem/ruby/bin" { @test "plugins ruby: PATH includes ~/.gem/ruby/bin" {
last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1); last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1);
[[ "${last_path_entry}" == "${HOME}"/.gem/ruby/*/bin ]] [[ "${last_path_entry}" == "${HOME}"/.gem/ruby/*/bin ]]