Skip to content

Commit be03110

Browse files
committed
Add Ruby 3 to build matrix
1 parent ed94512 commit be03110

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
gemfile: [websocket-driver-0.6.x, websocket-driver-0.7.x]
16-
ruby: [2.5, 2.6, 2.7]
16+
ruby: [2.5, 2.6, 2.7, 3.0]
1717

1818
runs-on: ubuntu-latest
1919
env:

lib/ferrum/proxy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
module Ferrum
88
class Proxy
9-
def self.start(*args)
10-
new(*args).tap(&:start)
9+
def self.start(**args)
10+
new(**args).tap(&:start)
1111
end
1212

1313
attr_reader :host, :port, :user, :password

spec/screenshot_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ def create_screenshot(**options)
142142
expect { browser.screenshot(path: file, full: true) }
143143
.to raise_exception(StandardError)
144144

145+
# Fix Ruby 3 `and_call_original` bug
146+
RSpec::Mocks.space.proxy_for(browser.page).reset
147+
145148
expect(File.exist?(file)).not_to be
146149
expect(browser.viewport_size).to eq([100, 100])
147150
end

0 commit comments

Comments
 (0)