Sha256: 748af6cb2fb7780be435c8b29680114c40fb48cba66da3eb48846c4843e50c3e

Contents?: true

Size: 836 Bytes

Versions: 18

Compression:

Stored size: 836 Bytes

Contents

require 'test/unit'
require 'fox16'

module Fox
  class TestCase < Test::Unit::TestCase
    #
    # Construct an application and main window for this test case's
    # use, based on the supplied application name.
    #
    def setup(*args)
      unless args.empty?
        appName = args[0]
	if FXApp.instance.nil?
	  @theApp = FXApp.new(appName, 'FXRuby')
	  @theApp.init([])
	else
	  @theApp = FXApp.instance
	end
	@theMainWindow = FXMainWindow.new(@theApp, appName)
      end      
    end
    
    # Return a reference to the application
    def app
      @theApp
    end
    
    # Return a reference to the main window
    def mainWindow
      @theMainWindow
    end
    
    # Override the base class version of default_test() so that
    # a test case with no tests doesn't trigger an error.
    def default_test; end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
fxruby-1.6.14-mswin32 tests/testcase.rb
fxruby-1.6.13-mswin32 tests/testcase.rb
fxruby-1.6.0 tests/testcase.rb
fxruby-1.6.1 tests/testcase.rb
fxruby-1.6.11 tests/testcase.rb
fxruby-1.6.10 tests/testcase.rb
fxruby-1.6.12 tests/testcase.rb
fxruby-1.6.13 tests/testcase.rb
fxruby-1.6.14-universal-darwin-9 tests/testcase.rb
fxruby-1.6.14 tests/testcase.rb
fxruby-1.6.2 tests/testcase.rb
fxruby-1.6.3 tests/testcase.rb
fxruby-1.6.4 tests/testcase.rb
fxruby-1.6.5 tests/testcase.rb
fxruby-1.6.6 tests/testcase.rb
fxruby-1.6.8 tests/testcase.rb
fxruby-1.6.7 tests/testcase.rb
fxruby-1.6.9 tests/testcase.rb