aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 18:03:25 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 18:10:53 +0200
commita731125f12c5834de7eae3455fad63ea4d348034 (patch)
tree0ada76c652c1a2a1fd68cdbecf5adc2df6beeb51 /activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb
parentd66e7835bea9505f7003e5038aa19b6ea95ceea1 (diff)
downloadrails-a731125f12c5834de7eae3455fad63ea4d348034.tar.gz
rails-a731125f12c5834de7eae3455fad63ea4d348034.tar.bz2
rails-a731125f12c5834de7eae3455fad63ea4d348034.zip
applies new string literal convention in activesupport/test
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
Diffstat (limited to 'activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb')
-rw-r--r--activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb b/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb
index a9fd878b80..903c7206cd 100644
--- a/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb
+++ b/activesupport/test/core_ext/module/attribute_accessor_per_thread_test.rb
@@ -1,5 +1,5 @@
-require 'abstract_unit'
-require 'active_support/core_ext/module/attribute_accessors_per_thread'
+require "abstract_unit"
+require "active_support/core_ext/module/attribute_accessors_per_thread"
class ModuleAttributeAccessorPerThreadTest < ActiveSupport::TestCase
def setup
@@ -57,21 +57,21 @@ class ModuleAttributeAccessorPerThreadTest < ActiveSupport::TestCase
def test_values_should_not_bleed_between_threads
threads = []
threads << Thread.new do
- @class.foo = 'things'
+ @class.foo = "things"
sleep 1
- assert_equal 'things', @class.foo
+ assert_equal "things", @class.foo
end
threads << Thread.new do
- @class.foo = 'other things'
+ @class.foo = "other things"
sleep 1
- assert_equal 'other things', @class.foo
+ assert_equal "other things", @class.foo
end
threads << Thread.new do
- @class.foo = 'really other things'
+ @class.foo = "really other things"
sleep 1
- assert_equal 'really other things', @class.foo
+ assert_equal "really other things", @class.foo
end
threads.each { |t| t.join }
@@ -108,7 +108,7 @@ class ModuleAttributeAccessorPerThreadTest < ActiveSupport::TestCase
end
def test_should_return_same_value_by_class_or_instance_accessor
- @class.foo = 'fries'
+ @class.foo = "fries"
assert_equal @class.foo, @object.foo
end