Skip to content

Instantly share code, notes, and snippets.

@jdickey
Created March 6, 2013 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdickey/5096554 to your computer and use it in GitHub Desktop.
Save jdickey/5096554 to your computer and use it in GitHub Desktop.
task :cruise do
system 'rake db:reset db:test:clone teabag spec'
end
task :cruise do
['db:reset', 'db:test:clone', 'teabag', 'spec'].each do |task|
Rake::Task[task].reenable
Rake::Task[task].invoke
end
end

Here follow two versions of a Rake task, which was originally created to use with CruiseControl.rb continuous integration.

When running the first, I get a reliable segfault whenever RSpec encounters any sort of error (typo in my code, misnamed/missing file, etc.) With the second, it's been reduced to a Heisenbug of sorts; it only repeats the behaviour once in every 5 to 8 opportunities, but when it does, repeatedly running the Rake task will produce the segfault exactly 5 times and then it stops. Very weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment