-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for version-name and version-origin hooks
- Loading branch information
1 parent
d3c728e
commit 4e26722
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bats | ||
|
||
load test_helper | ||
|
||
@test 'version-name continues to report default version if no Gemfile' { | ||
run rbenv version-name | ||
assert_success "system" | ||
} | ||
|
||
@test 'version-name recognizes ruby version in Gemfile' { | ||
create_version 1.8.7 | ||
cd_into_project_with_gemfile "'" 1.8.7 | ||
run rbenv version-name | ||
assert_success "1.8.7" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bats | ||
|
||
load test_helper | ||
|
||
@test 'version-origin continues to report default version if no Gemfile' { | ||
run rbenv version-origin | ||
assert_success "${RBENV_ROOT}/version" | ||
} | ||
|
||
@test 'version-origin reports Gemfile if set by Gemfile' { | ||
cd_into_project_with_gemfile "'" 1.8.7 | ||
run rbenv version-origin | ||
assert_success "Gemfile" | ||
} |