Sha256: b2220b70508e25308ca2e93a57ee0e7b33ca58a2b97b32bc25255f517d67f419
Contents?: true
Size: 590 Bytes
Versions: 6
Compression:
Stored size: 590 Bytes
Contents
require 'test/unit' require 'wx' class TestingFrame < Wx::Frame def initialize super(nil, -1, '') evt_paint { on_paint } end def on_paint paint {} close end end class AppWithSimpleFrame < Wx::App attr_reader(:did_call_on_exit) def on_init TestingFrame.new.show end def on_exit @did_call_on_exit = true return 0 end end class TestApp < Test::Unit::TestCase def test_self_closing_frame o = AppWithSimpleFrame.new o.run assert(o.did_call_on_exit, "didn't call on_exit?") end end
Version data entries
6 entries across 6 versions & 1 rubygems