Skip to content

Commit

Permalink
Merge pull request #1053 from MBonell/614-test-ruby-hello-world
Browse files Browse the repository at this point in the history
Closes #614: Add hello world test for ruby image
  • Loading branch information
tianon committed Sep 16, 2015
2 parents beee170 + 21c8d4f commit 7b620cb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ imageTests+=(
ruby-standard-libs
ruby-gems
ruby-bundler
ruby-hello-world
'
[tomcat]='
'
Expand Down Expand Up @@ -137,3 +138,4 @@ globalExcludeTests+=(
[ruby:slim_ruby-bundler]=1
[ruby:slim_ruby-gems]=1
)

1 change: 1 addition & 0 deletions test/tests/ruby-hello-world/expected-std-out.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello World!
1 change: 1 addition & 0 deletions test/tests/ruby-hello-world/hello-world.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print 'Hello World!'
8 changes: 8 additions & 0 deletions test/tests/ruby-hello-world/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

image="$1"
dirTest="$(dirname "$(readlink -f "$BASH_SOURCE")")"
dirContainer='/usr/src/ruby'

docker run -it --rm -v "$dirTest":"$dirContainer" -w "$dirContainer" "$image" ruby hello-world.rb

0 comments on commit 7b620cb

Please sign in to comment.