mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
304a38f7b0
Ruby2.0.0 default encoding is UTF-8 instead of US_ASCII
14 lines
361 B
Ruby
14 lines
361 B
Ruby
#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
|