added test example for plugin and lib

pull/440/head
Ivan Povalyukhin 2015-03-28 18:21:52 -07:00
parent a13719f28f
commit 28e5c99816
2 changed files with 17 additions and 1 deletions

View File

@ -3,7 +3,7 @@
load ../test_helper load ../test_helper
load ../../lib/composure load ../../lib/composure
@test "composure_keywords()" { @test "lib composure: composure_keywords()" {
run composure_keywords run composure_keywords
assert_output "about author example group param version" assert_output "about author example group param version"
} }

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bats
load ../test_helper
load ../../lib/composure
load ../../plugins/available/ruby.plugin
@test "plugins ruby: remove_gem is defined" {
run type remove_gem
assert_line 1 "remove_gem () "
}
@test "plugins ruby: PATH includes ~/.gem/ruby/bin" {
last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1);
[[ "${last_path_entry}" == "${HOME}"/.gem/ruby/*/bin ]]
}