summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-08 19:28:03 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-08 19:28:03 +0000
commit181ee8ca0855ca8f3af7317f2dc54c7ee63524f7 (patch)
tree9f5d96946e9d32a305e82c5778973a42e55fa1d3
parent37e264d7e132969e1faf87247e66abf909cedf29 (diff)
We'll be adding more Rails 3 tests..
-rwxr-xr-xt/t0300-rails3-basic.sh30
-rw-r--r--t/test-rails3.sh27
2 files changed, 28 insertions, 29 deletions
diff --git a/t/t0300-rails3-basic.sh b/t/t0300-rails3-basic.sh
index c617d69..3021276 100755
--- a/t/t0300-rails3-basic.sh
+++ b/t/t0300-rails3-basic.sh
@@ -1,33 +1,5 @@
 #!/bin/sh
-RAILS_VERSION=${RAILS_VERSION-3.0.0.beta3}
-
-. ./test-lib.sh
-
-case $RUBY_VERSION in
-1.8.7|1.9.2) ;;
-*)
-        t_info "RUBY_VERSION=$RUBY_VERSION unsupported for Rails 3"
-        exit 0
-        ;;
-esac
-
-arch_gems=../tmp/isolate/ruby-$RUBY_VERSION/gems
-rails_gems=../tmp/isolate/rails-$RAILS_VERSION/gems
-rails_bin="$rails_gems/rails-$RAILS_VERSION/bin/rails"
-if ! test -d "$arch_gems" || ! test -d "$rails_gems" || ! test -x "$rails_bin"
-then
-        ( cd ../ && $RAKE isolate )
-fi
-
-for i in $arch_gems/*-* $rails_gems/*-*
-do
-        if test -d $i/lib
-        then
-                RUBYLIB=$(cd $i/lib && pwd):$RUBYLIB
-        fi
-done
-
-export RUBYLIB
+. ./test-rails3.sh
 
 t_plan 3 "Rails 3 (beta) tests"
 
diff --git a/t/test-rails3.sh b/t/test-rails3.sh
new file mode 100644
index 0000000..1ade73b
--- /dev/null
+++ b/t/test-rails3.sh
@@ -0,0 +1,27 @@
+. ./test-lib.sh
+RAILS_VERSION=${RAILS_VERSION-3.0.0.beta3}
+case $RUBY_VERSION in
+1.8.7|1.9.2) ;;
+*)
+        t_info "RUBY_VERSION=$RUBY_VERSION unsupported for Rails 3"
+        exit 0
+        ;;
+esac
+
+arch_gems=../tmp/isolate/ruby-$RUBY_VERSION/gems
+rails_gems=../tmp/isolate/rails-$RAILS_VERSION/gems
+rails_bin="$rails_gems/rails-$RAILS_VERSION/bin/rails"
+if ! test -d "$arch_gems" || ! test -d "$rails_gems" || ! test -x "$rails_bin"
+then
+        ( cd ../ && $RAKE isolate )
+fi
+
+for i in $arch_gems/*-* $rails_gems/*-*
+do
+        if test -d $i/lib
+        then
+                RUBYLIB=$(cd $i/lib && pwd):$RUBYLIB
+        fi
+done
+
+export RUBYLIB