From a57cb89b3546845e9db2fcd45e4a8f16ade09b31 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Wed, 1 Apr 2026 23:14:45 +0900 Subject: minor update --- spec/dispatch/tools/registry_spec.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'spec/dispatch/tools/registry_spec.rb') 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 -- cgit v1.2.3