Sha256: 92faa172e82f4ab7f063c6efff9e115d39ac6dc7dc12bc307e4bbdf4a2068751

Contents?: true

Size: 372 Bytes

Versions: 2

Compression:

Stored size: 372 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activejob-lock-0.0.2 rails/activesupport/test/core_ext/module/anonymous_test.rb
activejob-lock-0.0.1 rails/activesupport/test/core_ext/module/anonymous_test.rb