Skip to content

Commit 0b49c3f

Browse files
authored
Merge pull request #26 from koic/suppress_rubocop_info
Enable RuboCop Minitest and RuboCop Rake for development
2 parents a32b7d2 + a169bbd commit 0b49c3f

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

.rubocop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
inherit_gem:
22
rubocop-shopify: rubocop.yml
3+
4+
plugins:
5+
- rubocop-minitest
6+
- rubocop-rake
7+
38
Naming/FileName:
49
Exclude:
510
- 'lib/mcp-ruby.rb'

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ gemspec
88
# Specify development dependencies below
99
gem "minitest", "~> 5.1", require: false
1010
gem "rake", "~> 13.0"
11+
gem "rubocop-minitest"
12+
gem "rubocop-rake"
1113
gem "rubocop-shopify", require: false
1214

1315
gem "minitest-reporters"

test/model_context_protocol/prompt_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def template(args, server_context:)
6767
assert_equal "a mock prompt for testing", prompt.description
6868
assert_equal "test_argument", prompt.arguments.first.name
6969
assert_equal "Test argument", prompt.arguments.first.description
70-
assert_equal true, prompt.arguments.first.required
70+
assert prompt.arguments.first.required
7171

7272
expected_template_result = {
7373
description: "Hello, world!",

test/model_context_protocol/server_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class ServerTest < ActiveSupport::TestCase
153153
assert_kind_of Array, result[:tools]
154154
assert_equal "test_tool", result[:tools][0][:name]
155155
assert_equal "Test tool", result[:tools][0][:description]
156-
assert_equal({}, result[:tools][0][:inputSchema])
156+
assert_empty(result[:tools][0][:inputSchema])
157157
assert_instrumentation_data({ method: "tools/list" })
158158
end
159159

test/model_context_protocol/tool/input_schema_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class InputSchemaTest < ActiveSupport::TestCase
2525

2626
test "missing_required_arguments returns an empty array if no required arguments are missing" do
2727
input_schema = InputSchema.new(properties: { message: { type: "string" } }, required: [:message])
28-
assert_equal [], input_schema.missing_required_arguments({ message: "Hello, world!" })
28+
assert_empty input_schema.missing_required_arguments({ message: "Hello, world!" })
2929
end
3030
end
3131
end

test/model_context_protocol/transports/stdio_transport_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class StdioTransportTest < ActiveSupport::TestCase
4646
response = JSON.parse(output.string, symbolize_names: true)
4747
assert_equal("2.0", response[:jsonrpc])
4848
assert_equal("123", response[:id])
49-
assert_equal({}, response[:result])
49+
assert_empty(response[:result])
5050
refute(@transport.instance_variable_get(:@open))
5151
ensure
5252
$stdin = original_stdin

0 commit comments

Comments
 (0)