forked from nickthecook/archyve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconversations.rb
31 lines (30 loc) · 1.07 KB
/
conversations.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FactoryBot.define do
factory :conversation do
model_config { association(:model_config) }
user { association(:user) }
messages do
[
build(:message, author: user, content: "Write a simple ruby program."),
build(:message, author: model_config, content: "loop { puts 'HA' }"),
build(:message, author: user, content: "Not exactly what I meant."),
]
end
factory :augmented_conversation do
messages do
[
build(:augmented_message, author: user),
build(:message, author: model_config, content: "loop { puts 'HA' }"),
build(
:augmented_message, author: user, content: <<~CONTENT,
Write a ruby program that lists the contents of the home directory for user 'bob'.
CONTENT
prompt: <<~PROMPT
Home directories are located a /home/username or /Users/username in a sane system.
Write a ruby program that lists the contents of the home directory for user 'bob'.
PROMPT
),
]
end
end
end
end