Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41c0bc3

Browse files
committed
Added tests for the main chruby function.
1 parent adb09a6 commit 41c0bc3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/chruby_test.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/share/shunit2/shunit2
2+
3+
. test/helper.sh
4+
5+
function tearDown()
6+
{
7+
chruby_reset
8+
}
9+
10+
function test_chruby_1_9()
11+
{
12+
chruby "1.9"
13+
14+
assertEquals "did not match $TEST_RUBY with 1.9" "$TEST_RUBY" "$RUBY"
15+
}
16+
17+
function test_chruby_system()
18+
{
19+
chruby "$TEST_RUBY_VERSION"
20+
chruby system
21+
22+
assertNull "did not reset the Ruby" "$RUBY"
23+
}

0 commit comments

Comments
 (0)