Skip to content

Commit fe239d1

Browse files
committed
[chore] simplify test logic
1 parent eab58e0 commit fe239d1

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/spec/ruby/rack/application_spec.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,16 +486,11 @@ def reset_config
486486
app_object = app_factory.newApplication
487487

488488
raise_info_logged = 0
489-
raise_error_logged = 0
490489
allow(@rack_context).to receive(:log) do |level, msg, e|
491490
if level.to_s == 'INFO'
492491
expect(msg).to eql 'failed to capture exception message'
493492
expect(e).to be_a java.lang.NoClassDefFoundError
494493
raise_info_logged += 1
495-
elsif level.to_s == 'ERROR'
496-
expect(msg).to eql 'unable to initialize application'
497-
expect(e).to be_a org.jruby.exceptions.RaiseException
498-
raise_error_logged += 1
499494
else
500495
true
501496
end
@@ -505,7 +500,7 @@ def reset_config
505500
app_object.init
506501
fail "expected to raise"
507502
rescue => e
508-
expect(e.message).to eql 'something went wrong'
503+
expect(e.message).to eql 'something went wrong' # original error
509504
end
510505

511506
expect(raise_info_logged).to eql 1 # logs info message for exception capture

0 commit comments

Comments
 (0)