Skip to content

Commit 981c5ab

Browse files
committed
Upgrade to latest Lemur and refactor test starter to match Roact
1 parent abe2847 commit 981c5ab

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

modules/lemur

Submodule lemur updated 128 files

spec.lua

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,6 @@ package.path = package.path .. ";?/init.lua"
1414
-- If this fails, make sure you've run `lua bin/install-dependencies.lua` first!
1515
local lemur = require("modules.lemur")
1616

17-
--[[
18-
Collapses ModuleScripts named 'init' into their parent folders.
19-
20-
This is the same behavior as the collapsing mechanism from rbxpacker.
21-
]]
22-
local function collapse(root)
23-
local init = root:FindFirstChild("init")
24-
if init then
25-
init.Name = root.Name
26-
init.Parent = root.Parent
27-
28-
for _, child in ipairs(root:GetChildren()) do
29-
child.Parent = init
30-
end
31-
32-
root:Destroy()
33-
root = init
34-
end
35-
36-
for _, child in ipairs(root:GetChildren()) do
37-
if child:IsA("Folder") then
38-
collapse(child)
39-
end
40-
end
41-
42-
return root
43-
end
44-
4517
-- Create a virtual Roblox tree
4618
local habitat = lemur.Habitat.new()
4719

@@ -51,13 +23,11 @@ Root.Name = "Root"
5123

5224
-- Load all of the modules specified above
5325
for _, module in ipairs(LOAD_MODULES) do
54-
local container = lemur.Instance.new("Folder", Root)
26+
local container = habitat:loadFromFs(module[1])
5527
container.Name = module[2]
56-
habitat:loadFromFs(module[1], container)
28+
container.Parent = Root
5729
end
5830

59-
collapse(Root)
60-
6131
-- Load TestEZ and run our tests
6232
local TestEZ = habitat:require(Root.TestEZ)
6333

0 commit comments

Comments
 (0)