This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TransactionalTests | |
# See minitest doco - use_transactional_fixtures_but_in_ruby | |
# to use include this into your test case | |
def run(runner) | |
test_result = nil | |
ActiveRecord::Base.transaction { test_result = super; raise ActiveRecord::Rollback } | |
test_result | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssbe@domU-12-31-39-02-3C-61:/srv/ssbe/core/current/db$ /opt/ruby-enterprise/bin/bundle install | |
Fetching source index from http://gemcutter.org/ | |
Using rake (0.8.7) from system gems | |
Using activesupport (2.0.1) from bundler gems | |
Using actionpack (2.0.1) from bundler gems | |
Using actionmailer (2.0.1) from bundler gems | |
Using activerecord (2.0.1) from bundler gems | |
Using activeresource (2.0.1) from bundler gems | |
Using rails (2.0.1) from bundler gems | |
Using tzinfo (0.3.20) from bundler gems |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Deploy and rollback on Heroku in staging and production | |
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
namespace :deploy do | |
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |