Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
85a01065
Commit
85a01065
authored
Jun 02, 2015
by
Tester
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
assert that rbenv-install/uninstall scripts have usage section preface
parent
f2f77388
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
test/rbenv.bats
+15
-0
No files found.
test/rbenv.bats
View file @
85a01065
...
@@ -12,6 +12,11 @@ stub_ruby_build() {
...
@@ -12,6 +12,11 @@ stub_ruby_build() {
stub ruby-build "--lib : $BATS_TEST_DIRNAME/../bin/ruby-build --lib" "$@"
stub ruby-build "--lib : $BATS_TEST_DIRNAME/../bin/ruby-build --lib" "$@"
}
}
extract_usage_from() {
local program="../bin/$1"
sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$program"
}
@test "install proper" {
@test "install proper" {
stub_ruby_build 'echo ruby-build "$@"'
stub_ruby_build 'echo ruby-build "$@"'
...
@@ -180,6 +185,11 @@ OUT
...
@@ -180,6 +185,11 @@ OUT
unstub rbenv-help
unstub rbenv-help
}
}
@test "rbenv-install has usage help preface" {
run extract_usage_from rbenv-install
assert_output_contains 'Usage: rbenv install'
}
@test "not enough arguments rbenv-uninstall" {
@test "not enough arguments rbenv-uninstall" {
stub rbenv-help 'uninstall : echo "Usage: rbenv uninstall"'
stub rbenv-help 'uninstall : echo "Usage: rbenv uninstall"'
...
@@ -209,3 +219,8 @@ OUT
...
@@ -209,3 +219,8 @@ OUT
unstub rbenv-help
unstub rbenv-help
}
}
@test "rbenv-uninstall has usage help preface" {
run extract_usage_from rbenv-uninstall
assert_output_contains 'Usage: rbenv uninstall'
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment