Skip to content

Commit aa766c8

Browse files
authored
Merge pull request #214 from rubycdp/213-fix-save_path
fix: expand path for `Capybara.save_path` and pass to Ferrum
2 parents 6455476 + 7f1dbc1 commit aa766c8

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
AllCops:
22
TargetRubyVersion: 2.6
33
NewCops: enable
4+
SuggestExtensions: false
45

56
Layout/FirstArrayElementIndentation:
67
EnforcedStyle: consistent
@@ -53,3 +54,5 @@ Metrics/ModuleLength:
5354
Metrics/PerceivedComplexity:
5455
Max: 14
5556

57+
require:
58+
- rubocop-rake

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ source "https://rubygems.org"
44

55
gem "byebug", "~> 11.0", platforms: %i[mri mingw x64_mingw]
66
gem "rubocop", "~> 1.22"
7+
gem "rubocop-rake", require: false
78

89
gemspec

lib/capybara/cuprite/driver.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(app, options = {})
3333
@screen_size = @options.delete(:screen_size)
3434
@screen_size ||= DEFAULT_MAXIMIZE_SCREEN_SIZE
3535

36-
@options[:save_path] = Capybara.save_path.to_s if Capybara.save_path
36+
@options[:save_path] = File.expand_path(Capybara.save_path) if Capybara.save_path
3737

3838
ENV["FERRUM_DEBUG"] = "true" if ENV["CUPRITE_DEBUG"]
3939

0 commit comments

Comments
 (0)