added test example for plugin and lib
This commit is contained in:
16
test/plugins/ruby.plugin.bats
Executable file
16
test/plugins/ruby.plugin.bats
Executable 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 ]]
|
||||
}
|
||||
Reference in New Issue
Block a user