Skip to content

Instantly share code, notes, and snippets.

@maxschulze
Created July 16, 2011 14:46
Show Gist options
  • Select an option

  • Save maxschulze/1086410 to your computer and use it in GitHub Desktop.

Select an option

Save maxschulze/1086410 to your computer and use it in GitHub Desktop.
Cover me configuration for Hudson
namespace :cover_me do
task :report do
puts "Reporting!"
CoverMe.config.formatter = CoverMe::EmmaFormatter
CoverMe.config.at_exit = Proc.new {}
CoverMe.complete!
end
end
task :spec do
Rake::Task['cover_me:report'].invoke
end
gem 'cover_me', '>= 1.0.0.rc6', :group => :test
#!/bin/bash -l
source "$HOME/.rvm/scripts/rvm"
# Use the correct ruby
rvm --create "1.9.2-p136@project"
gem install bundler
export RAILS_ENV=test
export DISPLAY=:99
cp $WORKSPACE/../database.yml $WORKSPACE/config/database.yml
cd $WORKSPACE
bundle
bundle exec rake -f $WORKSPACE/Rakefile db:migrate
bundle exec rake -f $WORKSPACE/Rakefile db:test:clone
sudo /etc/init.d/xvfb start
bundle exec rake -f $WORKSPACE/Rakefile ci:setup:rspec spec
bundle exec rake -f $WORKSPACE/Rakefile ci:setup:cucumber cucumber
RESULT=$?
sudo /etc/init.d/xvfb stop
exit $RESULT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment