~dyams/unity-2d/Alt-F10-Menu

« back to all changes in this revision

Viewing changes to tests/run-tests.rb

  • Committer: Tarmac
  • Author(s): Gerry Boland
  • Date: 2012-01-18 11:29:18 UTC
  • mfrom: (850.1.6 td-launcher-test-fix)
  • Revision ID: tarmac-20120118112918-7rvysnhowm02km9p
Rewrite launcher autohide_show_tests to use the verify* methods. Also add TmpWindow class manage creating and closing windows needed for tests.

Replacing the assert* with verify* methods mean we can remove the arbitrary sleep times, which means the test suite will run more smoothly (and faster!). The TmpWindow class provides book-keeping so that all created windows can be closed by the test teardown method, so that one failed test won't cause other tests to fail.. Fixes: . Appoved by Albert Astals Cid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
# Check script being run by Ruby 1.8.x, later versions not supported by TDriver
31
31
abort("Aborted! Ruby 1.9 not supported, use 1.8") unless RUBY_VERSION < '1.9'
32
32
 
 
33
# Time verify_* assertions should wait until they throw exception 
 
34
TIMEOUT = 10
 
35
 
33
36
# Add ./misc/lib to the list of library locations - need to calculate absolute path
34
37
require 'pathname'
35
38
$library_path = File.expand_path(File.dirname(__FILE__)) + '/misc/lib'