Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Add a Rake target for running the full rails3 integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
R. Tyler Croy committed May 25, 2012
1 parent f88f235 commit ee812ba
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 8 additions & 0 deletions examples/rails3-demo/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee812ba

Please sign in to comment.