Sha256: 82c54252e99370eda2ac264353a7c3f70b70b39e8ccaee2608dd56905f75c419

Contents?: true

Size: 361 Bytes

Versions: 9

Compression:

Stored size: 361 Bytes

Contents

#coding: US-ASCII
Capybara::SpecHelper.spec "#save_screenshot" do
  let(:image_path) { File.join(Dir.tmpdir, 'capybara-screenshot.png') }

  before do
    @session.visit '/'
    @session.save_screenshot image_path
  end

  it "should generate PNG file", :requires => [:screenshot] do
    magic = File.read(image_path, 4)
    magic.should eq "\x89PNG"
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
capybara-2.2.1 lib/capybara/spec/session/screenshot.rb
capybara-2.2.0 lib/capybara/spec/session/screenshot.rb
capybara-2.2.0.rc1 lib/capybara/spec/session/screenshot.rb
swipe-rails-0.0.5 vendor/bundle/gems/capybara-2.1.0/lib/capybara/spec/session/screenshot.rb
capybara-2.1.0 lib/capybara/spec/session/screenshot.rb
capybara-2.1.0.rc1 lib/capybara/spec/session/screenshot.rb
capybara-2.0.3 lib/capybara/spec/session/screenshot.rb
capybara-2.1.0.beta1 lib/capybara/spec/session/screenshot.rb
capybara-2.0.2 lib/capybara/spec/session/screenshot.rb