Nevermind, I just saw your other post. Really nice, thanks for sharing. - Matt
On Wed, Jun 23, 2010 at 12:22 PM, Matt Aimonetti <[email protected]>wrote: > That's a really cool setup Ryan. Would you mind explaining a bit more about > what you are testing and how you ares testing? > > Thanks, > > - Matt > > > On Wed, Jun 23, 2010 at 12:15 PM, Ryan Davis <[email protected]>wrote: > >> Here is my current macruby UI testing setup: >> >> Rakefile: >> >> + Has an isolate setup to pull down all my testing gems. >> + task build - runs xcodebuild to build a debug app >> + task link - runs a build and then hard links source files to build >> files >> >> ~/.emacs.el: >> >> + sets 'backup-by-copying-when-linked to t - allowing work on >> hardlinked files to go unimpeded. >> >> .autotest: >> >> + Sets ENV['RUBY'] to macruby. >> + Sets ENV['MACRUBY_TESTING'] to 1. >> + Sets ENV['GEM_HOME'] and ENV['GEM_PATH'] with expanded paths to pick >> up isolated gems during test runs. >> + initialize hook sets the test framework to minitest and runs the >> link rake task. >> + Overrides Autotest#make_test_cmd to execute the binary directly. >> >> lib/app_controller.rb: >> >> + sets $TESTING = ENV['MACRUBY_TESTING'] >> + applicationDidFinishLaunching requires minitest/macruby if $TESTING >> >> rb_main.rb: >> >> + needed to be tweaked to skip loading test files. >> >> 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. >> >> >> _______________________________________________ >> MacRuby-devel mailing list >> [email protected] >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >> > >
_______________________________________________ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
