Skip to content

Commit

Permalink
Merge pull request #181 from rjordan/patch-1
Browse files Browse the repository at this point in the history
Update threadsafe_attributes_test.rb
  • Loading branch information
rafaelfranca committed Jul 28, 2015
2 parents 7738a75 + bf65bec commit 10c7965
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/threadsafe_attributes_test.rb
Expand Up @@ -35,4 +35,12 @@ class TestClass
assert_equal "a value", @tester.safeattr
end

test "#threadsafe attributes inherit the value of the main thread when value is nil/false" do
@tester.safeattr = false
Thread.new do
assert @tester.safeattr_defined?
assert_equal false, @tester.safeattr
end.join
assert_equal false, @tester.safeattr
end
end

0 comments on commit 10c7965

Please sign in to comment.