Skip to content

Commit 6f87848

Browse files
committed
Assert on eval schema too
1 parent dcc4d11 commit 6f87848

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

spec/tools/project_eval_spec.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,35 @@
77
end
88
end
99

10+
11+
describe ".input_schema_to_json" do
12+
let(:expected_input_schema) do
13+
{
14+
properties: {
15+
arguments: {
16+
description: "The arguments to pass to evaluation. They are available inside the evaluated code as `arguments`.",
17+
items: {},
18+
type: "array"
19+
},
20+
code: {
21+
description: "The Ruby code to evaluate",
22+
type: "string"
23+
},
24+
timeout: {
25+
description: "The timeout in milliseconds. If the evaluation takes longer than this, it will be terminated. Defaults to 30000 (30 seconds).",
26+
type: "number"
27+
}
28+
},
29+
required: [ "code" ],
30+
type: "object"
31+
}
32+
end
33+
34+
it "returns the correct input schema" do
35+
expect(described_class.input_schema_to_json).to eq(expected_input_schema)
36+
end
37+
end
38+
1039
describe "#call" do
1140
let(:code) { nil }
1241

0 commit comments

Comments
 (0)