Skip to content

Commit 6dd39b3

Browse files
committed
test that the views get generated
1 parent 6e125dd commit 6dd39b3

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

spec/langchainrb_rails/generators/langchainrb_rails/assistant_generator_spec.rb

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
end
1313

1414
after(:all) do
15-
FileUtils.rm_rf(destination_root)
15+
delete_directory(destination_root)
1616
end
1717

1818
it "creates an assistant model" do
@@ -30,4 +30,34 @@
3030
it "creates an assistants migration" do
3131
assert_migration "db/migrate/create_assistants.rb"
3232
end
33+
34+
describe "views" do
35+
it "creates index view" do
36+
assert_file "app/views/assistants/index.html.erb"
37+
end
38+
39+
it "creates show view" do
40+
assert_file "app/views/assistants/show.html.erb"
41+
end
42+
43+
it "creates edit view" do
44+
assert_file "app/views/assistants/edit.html.erb"
45+
end
46+
47+
it "creates new view" do
48+
assert_file "app/views/assistants/new.html.erb"
49+
end
50+
51+
it "creates chat partial" do
52+
assert_file "app/views/assistants/_message.html.erb"
53+
end
54+
55+
it "creates message form partial" do
56+
assert_file "app/views/assistants/_message_form.html.erb"
57+
end
58+
59+
it "creates chat stream template" do
60+
assert_file "app/views/assistants/chat.turbo_stream.erb"
61+
end
62+
end
3363
end

0 commit comments

Comments
 (0)