@@ -66,14 +66,28 @@ describe("projectionist", function()
6666 )
6767 end )
6868
69- it (" Eliveview" , function ()
70- vim .cmd .Eliveview (" project_a_web/user" )
71- vim .cmd .write ()
72-
73- assert .are .same (
74- vim .fn .readfile (" lib/project_a_web/live/user_live.ex" ),
75- { " defmodule ProjectAWeb.UserLive do" , " use ProjectAWeb, :live_view" , " end" }
76- )
69+ describe (" Eliveview" , function ()
70+ it (" root path" , function ()
71+ vim .cmd .Eliveview (" project_a_web/user_live" )
72+ vim .cmd .write ()
73+
74+ assert .are .same (
75+ vim .fn .readfile (" lib/project_a_web/live/user_live.ex" ),
76+ { " defmodule ProjectAWeb.UserLive do" , " use ProjectAWeb, :live_view" , " end" }
77+ )
78+ end )
79+
80+ -- TODO: i think we need a more specific projection transformer here to convert
81+ -- `project_a_web/user_live_index` into the correct module name.
82+ pending (" with action" , function ()
83+ vim .cmd .Eliveview (" project_a_web/user_live/index" )
84+ vim .cmd .write ()
85+
86+ assert .are .same (
87+ vim .fn .readfile (" lib/project_a_web/live/user_live/index.ex" ),
88+ { " defmodule ProjectAWeb.UserLive.Index do" , " use ProjectAWeb, :live_view" , " end" }
89+ )
90+ end )
7791 end )
7892
7993 it (" Elivecomponent" , function ()
0 commit comments