aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/module/anonymous_test.rb
diff options
context:
space:
mode:
authorDaniel Colson <danieljamescolson@gmail.com>2018-01-25 18:14:09 -0500
committerDaniel Colson <danieljamescolson@gmail.com>2018-01-25 23:32:59 -0500
commit94333a4c31bd10c1f358c538a167e6a4589bae2d (patch)
tree9106c349180bbdcba2e7839e0e79144e3a15a055 /activesupport/test/core_ext/module/anonymous_test.rb
parent211adb47e76b358ea15a3f756431c042ab231c23 (diff)
downloadrails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.gz
rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.bz2
rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.zip
Use assert_predicate and assert_not_predicate
Diffstat (limited to 'activesupport/test/core_ext/module/anonymous_test.rb')
-rw-r--r--activesupport/test/core_ext/module/anonymous_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/core_ext/module/anonymous_test.rb b/activesupport/test/core_ext/module/anonymous_test.rb
index 606f22c9b5..e03c217015 100644
--- a/activesupport/test/core_ext/module/anonymous_test.rb
+++ b/activesupport/test/core_ext/module/anonymous_test.rb
@@ -5,12 +5,12 @@ require "active_support/core_ext/module/anonymous"
class AnonymousTest < ActiveSupport::TestCase
test "an anonymous class or module are anonymous" do
- assert Module.new.anonymous?
- assert Class.new.anonymous?
+ assert_predicate Module.new, :anonymous?
+ assert_predicate Class.new, :anonymous?
end
test "a named class or module are not anonymous" do
- assert !Kernel.anonymous?
- assert !Object.anonymous?
+ assert_not_predicate Kernel, :anonymous?
+ assert_not_predicate Object, :anonymous?
end
end