Sha256: 1fd47a4c3cb0ad813fed1ceb76050a1b7fc90e77a32b09d96ba06d432df5ab8d
Contents?: true
Size: 436 Bytes
Versions: 97
Compression:
Stored size: 436 Bytes
Contents
# coding: US-ASCII # frozen_string_literal: true Capybara::SpecHelper.spec '#save_screenshot' do let(:image_path) { File.join(Dir.tmpdir, 'capybara-screenshot.png') } before do @session.visit '/' end it 'should generate PNG file', requires: [:screenshot] do path = @session.save_screenshot image_path magic = File.read(image_path, 4) expect(magic).to eq "\x89PNG" expect(path).to eq image_path end end
Version data entries
97 entries across 83 versions & 5 rubygems