Skip to content

Commit

Permalink
add specs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmexe committed Dec 2, 2024
1 parent b2fb826 commit 63bbadb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ferrum/browser/options/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def self.options

# @return [String, nil]
def self.version
out, _ = Open3.capture2(detect_path, "--version")
out, = Open3.capture2(detect_path, "--version")
out.strip
rescue Errno::ENOENT
nil
Expand Down
6 changes: 6 additions & 0 deletions spec/browser/options/chrome_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@
expect(defaults.merge_default({}, options)).not_to include("use-angle" => "metal")
end
end

describe ".version" do
it "returns an executable version" do
expect(described_class.version).to match(/Chromium \d/)
end
end
end

0 comments on commit 63bbadb

Please sign in to comment.