require 'test/unit'

# make it possible to load the test cases from the local directory
$:.unshift File.dirname(__FILE__)

# FIXME - should not need to list all the tests here - should be able to extract them from the directory listing instead.

require 'basics'
require 'hosting'
require 'info_pages'
require 'instance'
require 'instance_auth'
require 'instance_info'
require 'migration'
require 'person_editing'
require 'person_edit_list_details'
require 'person_photo'
require 'position_editing'

require 'test/unit'

# Change to the directory this file is in, and add it to the load path
Dir.chdir( File.dirname(__FILE__) )
$LOAD_PATH.unshift '.'

# List all the files that we should ignore because they do not contain tests
ignore_files = [
  File.basename(__FILE__),   # this file
  'popit_watir_test_case.rb' # library file
]

# get all the ruby files in this directory
test_files = Dir.glob('*.rb')

# remove those that we have chosen to ignore
test_files.reject! { |item| ignore_files.include?( item ) }

# require the remaining so that the unit tests in them are run
test_files.each { |file| require file }

Change Watir test runner so that it does not contain a hardcoded list of files to run tests for
Change Watir test runner so that it does not contain a hardcoded list of files to run tests for
