Skip to content

Commit

Permalink
run 'bundle exec rubocop -A' to fix latest master build
Browse files Browse the repository at this point in the history
  • Loading branch information
Mifrill committed Apr 6, 2022
1 parent 5ddd5aa commit c3be94d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/features/driver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def create_screenshot(file, *args)

def create_screenshot(file, *args)
image = @driver.render_base64(format, *args)
File.open(file, "wb") { |f| f.write Base64.decode64(image) }
File.binwrite(file, Base64.decode64(image))
end

it "supports rendering the page in base64" do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/session_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@

it "attaches a file when passed a Pathname" do
filename = Pathname.new("spec/tmp/a_test_pathname").expand_path
File.open(filename, "w") { |f| f.write("text") }
File.write(filename, "text")

element = @session.find(:css, "#change_me_file")
element.set(filename)
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def save_exception_screenshot(browser, filename, line_number, timestamp)

def save_exception_log(browser, filename, line_number, timestamp)
log_name = "logfile-#{filename}-#{line_number}-#{timestamp}.txt"
File.open("/tmp/cuprite/#{log_name}", "wb") { |f| f.write(browser.logger.string) }
File.binwrite("/tmp/cuprite/#{log_name}", browser.logger.string)
rescue StandardError => e
puts "#{e.class}: #{e.message}"
end
Expand Down

0 comments on commit c3be94d

Please sign in to comment.