Skip to content

Commit 73e20e7

Browse files
committed
Fix Rubocop issues
1 parent 67fc45d commit 73e20e7

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

spec/openai_ask_action_spec.rb

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def run_test(prompt_param:, question_param:, expected_prompt:, expected_response
144144
it 'opts out of storing Chat Completions by default' do
145145
body = JSON.parse(described_class.request_body(prompt: 'sys', question: 'q'))
146146

147-
expect(body['store']).to eq(false)
147+
expect(body['store']).to be(false)
148148
end
149149

150150
it 'calls the API with :release_notes prompt' do
@@ -277,7 +277,7 @@ def run_test(prompt_param:, question_param:, expected_prompt:, expected_response
277277
expect(tool_result_msg['tool_call_id']).to eq('call_xyz')
278278
expect(JSON.parse(tool_result_msg['content'])).to eq({ 'ok' => false, 'message' => 'too long' })
279279
expect(body['tools']).to eq(JSON.parse(tools.to_json))
280-
expect(body['store']).to eq(false)
280+
expect(body['store']).to be(false)
281281
expect(body['max_completion_tokens']).to eq(described_class.const_get(:DEFAULT_MAX_COMPLETION_TOKENS))
282282
expect(body).not_to have_key('max_tokens')
283283
end
@@ -610,11 +610,11 @@ def to_json(*_args)
610610
'type' => 'function',
611611
'function' => {
612612
'name' => 'check_length',
613-
'arguments' => 'this is not valid JSON with secret_token=abc123 {',
614-
},
613+
'arguments' => 'this is not valid JSON with secret_token=abc123 {'
614+
}
615615
},
616616
{
617-
'check_length' => ->(_args) { raise 'should not be called' },
617+
'check_length' => ->(_args) { raise 'should not be called' }
618618
}
619619
)
620620

@@ -631,11 +631,11 @@ def to_json(*_args)
631631
'type' => 'custom',
632632
'custom' => {
633633
'name' => 'custom_tool',
634-
'input' => 'payload',
635-
},
634+
'input' => 'payload'
635+
}
636636
},
637637
{
638-
'custom_tool' => ->(_args) { raise 'should not be called' },
638+
'custom_tool' => ->(_args) { raise 'should not be called' }
639639
}
640640
)
641641

@@ -654,11 +654,11 @@ def to_json(*_args)
654654
'id' => 'call_missing_name',
655655
'type' => 'function',
656656
'function' => {
657-
'arguments' => '{}',
658-
},
657+
'arguments' => '{}'
658+
}
659659
},
660660
{
661-
'validate_length' => ->(_args) { raise 'should not be called' },
661+
'validate_length' => ->(_args) { raise 'should not be called' }
662662
}
663663
)
664664

@@ -721,8 +721,8 @@ def to_json(*_args)
721721
{
722722
type: 'custom',
723723
custom: {
724-
name: 'custom_tool',
725-
},
724+
name: 'custom_tool'
725+
}
726726
},
727727
]
728728
)
@@ -739,8 +739,8 @@ def to_json(*_args)
739739
{
740740
type: 'function',
741741
function: {
742-
parameters: {},
743-
},
742+
parameters: {}
743+
}
744744
},
745745
]
746746
)

0 commit comments

Comments
 (0)