Sha256: 5804dcda6b4c090ecddabd3761c76ef6b7a4bf79dc0d343dab39fee7d49bb2c9

Contents?: true

Size: 604 Bytes

Versions: 3

Compression:

Stored size: 604 Bytes

Contents

require 'test/unit'
require 'wx'

class AppReturnsFalseFromInit < Wx::App
    attr_reader :did_call_on_init, :the_app_name
    
    def on_init
        @did_call_on_init = true
        @the_app_name = self.get_app_name
        return false
    end
    
end

class TestApp < Test::Unit::TestCase
  def test_return_false_from_init
    o = AppReturnsFalseFromInit.new
    o.run
    assert(o.did_call_on_init, "didn't call on_init?")
    assert_equal("wxruby", o.the_app_name)
  end
  
end

if $0 == __FILE__
  require 'test/unit/ui/console/testrunner'
  Test::Unit::UI::Console::TestRunner.run(TestApp)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wxruby3-0.9.0.pre.beta.10 tests/testapp_noframe.rb
wxruby3-0.9.0.pre.beta.9 tests/testapp_noframe.rb
wxruby3-0.9.0.pre.beta.8 tests/testapp_noframe.rb