diff --git a/spec/gears/object_spec.lua b/spec/gears/object_spec.lua index 692e9fd19..17a0dcae0 100644 --- a/spec/gears/object_spec.lua +++ b/spec/gears/object_spec.lua @@ -52,6 +52,12 @@ describe("gears.object", function() called = true end obj:weak_connect_signal("signal", cb) + + -- Check that the GC doesn't disconnect the signal + for i = 1, 10 do + collectgarbage("collect") + end + obj:emit_signal("signal") assert.is_true(called) end)