Skip to content

Instantly share code, notes, and snippets.

Created May 1, 2015 20:59
Show Gist options
  • Save anonymous/10dbe7ca73778b9c725a to your computer and use it in GitHub Desktop.
Save anonymous/10dbe7ca73778b9c725a to your computer and use it in GitHub Desktop.
def foo
Thread.new do
raise
end.abort_on_exception = true
end
RSpec.describe do
it do
expect do
foo
(Thread.list - [Thread.current]).each { |thr| thr.join }
end.to raise_error
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment