diff --git a/spec/wibox/hierarchy_spec.lua b/spec/wibox/hierarchy_spec.lua index 6472eda33..98a1abad5 100644 --- a/spec/wibox/hierarchy_spec.lua +++ b/spec/wibox/hierarchy_spec.lua @@ -8,12 +8,10 @@ local hierarchy = require("wibox.hierarchy") local cairo = require("lgi").cairo local matrix = require("gears.matrix") local object = require("gears.object") +local utils = require("wibox.test_utils") local function make_widget(children) - local result = object() - result:add_signal("widget::redraw_needed") - result:add_signal("widget::layout_changed") - result.visible = true + local result = utils.widget_stub() result.layout = function() return children end diff --git a/spec/wibox/test_utils.lua b/spec/wibox/test_utils.lua index d1e4954e3..e13fef340 100644 --- a/spec/wibox/test_utils.lua +++ b/spec/wibox/test_utils.lua @@ -82,8 +82,10 @@ assert:register("assertion", "widget_layout", widget_layout, "assertion.widget_l return { widget_stub = function(width, height) local w = object() + w:add_signal("widget::redraw_needed") + w:add_signal("widget::layout_changed") w.visible = true - + w.opacity = 1 w.fit = function() return width or 10, height or 10 end