diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/caching_test.rb | 4 | ||||
-rw-r--r-- | activesupport/test/core_ext/class/attribute_test.rb | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index b79a7bbaec..28ef695a4b 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -649,12 +649,12 @@ class CacheStoreLoggerTest < ActiveSupport::TestCase def test_logging @cache.fetch('foo') { 'bar' } - assert @buffer.string.present? + assert_present @buffer.string end def test_mute_logging @cache.mute { @cache.fetch('foo') { 'bar' } } - assert @buffer.string.blank? + assert_blank @buffer.string end end diff --git a/activesupport/test/core_ext/class/attribute_test.rb b/activesupport/test/core_ext/class/attribute_test.rb index 24aa5c0eba..d58b60482b 100644 --- a/activesupport/test/core_ext/class/attribute_test.rb +++ b/activesupport/test/core_ext/class/attribute_test.rb @@ -65,4 +65,9 @@ class ClassAttributeTest < ActiveSupport::TestCase object.singleton_class.setting = 'foo' assert_equal 'foo', object.setting end + + test 'setter returns set value' do + val = @klass.send(:setting=, 1) + assert_equal 1, val + end end |