Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a Rake target for running the full rails3 integration test

  • Loading branch information...
commit ee812bade4c056042dbc6d92c49ade915bc3f262 1 parent f88f235
R. Tyler Croy rtyler authored
Showing with 20 additions and 0 deletions.
  1. +12 −0 Rakefile
  2. +8 −0 examples/rails3-demo/run-test.sh
12 Rakefile
View
@@ -17,6 +17,18 @@ namespace :spec do
end
end
+namespace :test do
+ namespace :rails3 do
+ desc "Run an integration test with the rails3-demo code (slow)"
+ task :testunit do |t|
+ unless File.exists? File.expand_path("~/.rvm/scripts/rvm")
+ abort("I don't think you have RVM installed, which means this test will fail")
+ end
+ sh "(cd examples/rails3-demo && ./run-test.sh)"
+ end
+ end
+end
+
Rake::TestTask.new(:examples) do |test|
test.libs << 'lib' << 'examples'
8 examples/rails3-demo/run-test.sh
View
@@ -2,6 +2,14 @@
RAKE="bundle exec rake"
+# Resetting some environment variables in case our parent is running us via
+# Rake
+export GEM_HOME=
+export GEM_PATH=
+export BUNDLE_GEMFILE=
+export BUNDLE_BIN_PATH=
+export RUBYOPT=
+
# Make sure we load RVM into the shell properly
source ~/.rvm/scripts/rvm
# Make sure we load in our .rvmrc to use the right gemset
Please sign in to comment.
Something went wrong with that request. Please try again.