Skip to content

Instantly share code, notes, and snippets.

@djberg96
Created May 30, 2016 16:36
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 djberg96/3cdbf3b32454064ff7f5d971bf150b56 to your computer and use it in GitHub Desktop.
Save djberg96/3cdbf3b32454064ff7f5d971bf150b56 to your computer and use it in GitHub Desktop.
require 'minitest/autorun'
class TC_Thread_HasKey_InstanceMethod < MiniTest::Test
def setup
@thread = Thread.new{ Thread.current[:foo] = 'test' }
end
# Why does this fail?
def test_has_key
assert(@thread.key?(:foo))
end
def teardown
@thread.exit
@thread = nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment