Skip to content

Commit f0f3d11

Browse files
committed
use custom rspec matcher
1 parent 58e6c66 commit f0f3d11

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

rb/spec/unit/selenium/webdriver/common/selenium_manager_spec.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,9 @@ module WebDriver
9898
stdout = '{"result": "value", "logs": []}'
9999
allow(Open3).to receive(:capture3).and_return([stdout, 'stderr', status])
100100

101-
expect(WebDriver.logger).to receive(:info).with(
102-
a_string_including('No valid process exit status'),
103-
hash_including(id: :selenium_manager)
104-
)
105-
106-
expect(described_class.send(:run, 'anything')).to eq 'value'
101+
expect {
102+
expect(described_class.send(:run, 'anything')).to eq 'value'
103+
}.to have_info(:info)
107104
end
108105

109106
it 'raises if result is nil even with successful exitstatus' do

0 commit comments

Comments
 (0)