minitest-macruby

home

github.com/seattlerb/minitest-macruby

rdoc

bfts.rubyforge.org/minitest-macruby

DESCRIPTION:

minitest-macruby provides extensions to minitest for macruby UI testing. It provides a framework to test GUI apps in a live instance. Documentation and examples are light at the moment as I’ve just thrown this together. Suggestions for extensions are very welcome!

Currently it provides the following methods in minitest’s assertions:

My Current UI Testing Setup

Here is my current macruby UI testing setup:

Rakefile:

~/.emacs.el:

.autotest:

lib/app_controller.rb:

rb_main.rb:

Walkthrough:

So, when I fire up autotest it will build the application and then hardlink all the original source files into the build. This allows autotest to scan the lib and test dirs but invoking the application will pick up all my changes without having to rebuild. This greatly speeds up development.

When autotest runs the application directly, it does so with MACRUBY_TESTING set in the environment. The application sees this and sets $TESTING to true and once the app is done launching, it loads minitest/macruby. That in turn loads up all the test files in the build dir and then runs the tests. Once the tests are run, it exits with the appropriate exit code depending on test results.

FEATURES/PROBLEMS:

SYNOPSIS:

new, open, _, close, save = find_ui_menu_items "File"

assert_ui_action  new,   delegate, "new_document:", "n"
assert_ui_action  open,  delegate, "open_document:", "o"
assert_ui_action  close, delegate, "close_document:", "w"

assert_ui_binding close, :enabled, delegate, has_window

REQUIREMENTS:

INSTALL:

LICENSE:

(The MIT License)

Copyright © Ryan Davis, seattle.rb

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.