Skip to content

Instantly share code, notes, and snippets.

@andreastt
Created June 7, 2011 13:47
Show Gist options
  • Save andreastt/1012289 to your computer and use it in GitHub Desktop.
Save andreastt/1012289 to your computer and use it in GitHub Desktop.
require 'operawatir/helper'
describe '323197' do
before :all do
browser.goto 'http://t/core/bts/interactive/323197/001.html'
@counter = browser.div
end
#
# The counter should increase each time you press F10. If the count
# only increases every second time you press the key, it is a FAIL.
#
it 'listens for F10 on every keypress' do
4.times { expect { browser.keys.send(:F10) }.to change { @counter.text.to_i }.by(1) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment