diff options
| author | Adam Malczewski <[email protected]> | 2026-04-01 23:14:45 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-04-01 23:14:45 +0900 |
| commit | a57cb89b3546845e9db2fcd45e4a8f16ade09b31 (patch) | |
| tree | be3b186e8474f8cf79c464fe0fb35eca40614a64 /spec/dispatch/tools/registry_spec.rb | |
| parent | cc97aeb35f8e0f61a13ee28b94355afa7c884281 (diff) | |
| download | dispatch-tools-interface-a57cb89b3546845e9db2fcd45e4a8f16ade09b31.tar.gz dispatch-tools-interface-a57cb89b3546845e9db2fcd45e4a8f16ade09b31.zip | |
minor updatedev
Diffstat (limited to 'spec/dispatch/tools/registry_spec.rb')
| -rw-r--r-- | spec/dispatch/tools/registry_spec.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/dispatch/tools/registry_spec.rb b/spec/dispatch/tools/registry_spec.rb index fc7332c..9574f19 100644 --- a/spec/dispatch/tools/registry_spec.rb +++ b/spec/dispatch/tools/registry_spec.rb @@ -10,7 +10,7 @@ RSpec.describe Dispatch::Tools::Registry do properties: { path: { type: "string" } }, - required: ["path"] + required: [ "path" ] } ) { |params, _context| Dispatch::Tools::Result.success(output: "contents of #{params[:path]}") } end @@ -39,7 +39,7 @@ RSpec.describe Dispatch::Tools::Registry do properties: { path: { type: "string" } }, - required: ["path"] + required: [ "path" ] } ) { |_params, _context| Dispatch::Tools::Result.success(output: "deleted") } end @@ -88,8 +88,8 @@ RSpec.describe Dispatch::Tools::Registry do expect(tool).to be(read_file_tool) end - it "raises ToolNotFoundError for unknown tool name" do - expect { registry.get("nonexistent") }.to raise_error(Dispatch::Tools::ToolNotFoundError) + it "returns nil for unknown tool name" do + expect(registry.get("nonexistent")).to be_nil end end @@ -142,16 +142,16 @@ RSpec.describe Dispatch::Tools::Registry do expect(result).to be_an(Array) expect(result.size).to eq(1) expect(result.first).to eq({ - name: "read_file", - description: "Read the contents of a file", - parameters: { - type: "object", - properties: { - path: { type: "string" } - }, - required: ["path"] - } - }) + name: "read_file", + description: "Read the contents of a file", + parameters: { + type: "object", + properties: { + path: { type: "string" } + }, + required: [ "path" ] + } + }) end it "returns plain hashes, not structs" do |
