blob: 606f22c9b5bf05f134bb5b398ebfe2fda8ca4241 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
require "abstract_unit"
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?
end
test "a named class or module are not anonymous" do
assert !Kernel.anonymous?
assert !Object.anonymous?
end
end
|