|
13 | 13 | expect(config.request_timeout).to eq(8000) |
14 | 14 | expect(config.log_file).to eq($stdout) |
15 | 15 | expect(config.log_level).to eq(Logger::INFO) |
16 | | - expect(config.has_support_complex_parameters).to be(false) |
17 | 16 | expect(config.protocol_version).to eq(RubyLLM::MCP::Protocol.latest_version) |
18 | 17 | end |
19 | 18 |
|
|
53 | 52 | expect(config.log_level).to eq(Logger::ERROR) |
54 | 53 | end |
55 | 54 |
|
56 | | - it "allows reading and writing has_support_complex_parameters" do |
57 | | - config.has_support_complex_parameters = true |
58 | | - expect(config.has_support_complex_parameters).to be(true) |
59 | | - end |
60 | | - |
61 | 55 | it "allows reading and writing protocol_version" do |
62 | 56 | config.protocol_version = "2024-11-05" |
63 | 57 | expect(config.protocol_version).to eq("2024-11-05") |
|
77 | 71 | # Change some values |
78 | 72 | config.request_timeout = 5000 |
79 | 73 | config.log_level = Logger::ERROR |
80 | | - config.has_support_complex_parameters = true |
81 | 74 | config.protocol_version = "2024-11-05" |
82 | 75 |
|
83 | 76 | # Reset |
|
87 | 80 | expect(config.request_timeout).to eq(8000) |
88 | 81 | expect(config.log_file).to eq($stdout) |
89 | 82 | expect(config.log_level).to eq(Logger::INFO) |
90 | | - expect(config.has_support_complex_parameters).to be(false) |
91 | 83 | expect(config.protocol_version).to eq(RubyLLM::MCP::Protocol.latest_version) |
92 | 84 | end |
93 | 85 |
|
|
145 | 137 | end |
146 | 138 | end |
147 | 139 |
|
148 | | - describe "support_complex_parameters!" do |
149 | | - it "sets has_support_complex_parameters to true" do |
150 | | - config = RubyLLM::MCP::Configuration.new |
151 | | - expect(config.has_support_complex_parameters).to be(false) |
152 | | - |
153 | | - config.support_complex_parameters! |
154 | | - expect(config.has_support_complex_parameters).to be(true) |
155 | | - end |
156 | | - |
157 | | - it "calls RubyLLM::MCP.support_complex_parameters!" do |
158 | | - config = RubyLLM::MCP::Configuration.new |
159 | | - allow(RubyLLM::MCP).to receive(:support_complex_parameters!) |
160 | | - |
161 | | - config.support_complex_parameters! |
162 | | - |
163 | | - expect(RubyLLM::MCP).to have_received(:support_complex_parameters!) |
164 | | - end |
165 | | - |
166 | | - it "does not call RubyLLM::MCP.support_complex_parameters! if already enabled" do |
167 | | - config = RubyLLM::MCP::Configuration.new |
168 | | - config.support_complex_parameters! |
169 | | - |
170 | | - allow(RubyLLM::MCP).to receive(:support_complex_parameters!) |
171 | | - |
172 | | - config.support_complex_parameters! |
173 | | - |
174 | | - expect(RubyLLM::MCP).not_to have_received(:support_complex_parameters!) |
175 | | - end |
176 | | - end |
177 | | - |
178 | | - it "can be configured with support_complex_parameters!" do |
179 | | - RubyLLM::MCP.configure(&:support_complex_parameters!) |
180 | | - |
181 | | - expect(RubyLLM::MCP.configuration.has_support_complex_parameters).to be(true) |
182 | | - end |
183 | | - |
184 | 140 | it "can be configured with a custom logger" do |
185 | 141 | RubyLLM::MCP.configure do |config| |
186 | 142 | config.logger = Logger.new($stdout) |
|
0 commit comments