mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
25 lines
382 B
Ruby
25 lines
382 B
Ruby
require_relative 'helper'
|
|
|
|
class TestSubclassTracking < Sidetiq::TestCase
|
|
class Base
|
|
end
|
|
|
|
class Foo < Base
|
|
extend Sidetiq::SubclassTracking
|
|
end
|
|
|
|
class Bar < Foo
|
|
end
|
|
|
|
class Baz < Bar
|
|
end
|
|
|
|
def test_subclasses_non_recursive
|
|
assert_equal [Bar], Foo.subclasses
|
|
end
|
|
|
|
def test_subclasses_recursive
|
|
assert_equal [Bar, Baz], Foo.subclasses(true)
|
|
end
|
|
end
|
|
|