Thanks for checking in on this!
AsUnit 4 is a full rewrite that Robert Penner started in early 2010.
It is an amazing bit of code that started with the ideas that AsUnit 3
was too slow (and messy) and annotations were too powerful to ignore.
We got it into a usable state this past summer but haven't managed to
put together an announcement or instructional materials.
Robert Penner, Ali and I use it everyday along with a small cohort of
other folks and it has been stable and blazing fast. Unfortunately,
the only documentation for it are it's own tests. The good news is -
that the tests are thorough and provide a pretty great bit of
documentation.
The prerelease build of Sprouts v1 uses AsUnit 4 and provides some
generators and support that make it painless.
Some of the highlights (as I recall) of AsUnit 4 are:
* It's wicked fast
* Composition is better than inheritance
* It uses annotations, which provide enormous flexibility
* It works with Air, Flex, Authoring, and any other ActionScript
3-based environment
* It can swap runners at runtime, so we can support legacy test cases
(or even - at some point - other framework's test cases)
* It's much easier to build custom printers for
* The async functionality is much cleaner
Following are some examples if you're interested:
Runner / Entry Point(s):
AS3:
https://github.com/patternpark/asunit/blob/master/asunit-4.0/test/AsUnitRunner.as
Flex 3:
https://github.com/patternpark/asunit/blob/master/asunit-4.0/test/Flex3Runner.mxml
Flex 4:
https://github.com/patternpark/asunit/blob/master/asunit-4.0/test/Flex4Runner.mxml
AIR 2:
https://github.com/patternpark/asunit/blob/master/asunit-4.0/air/AIR2Runner.mxml
Test Suite:
https://github.com/patternpark/asunit/blob/master/asunit-4.0/test/AllTests.as
Visual Test Case:
https://github.com/patternpark/asunit/blob/master/asunit-4.0/test/asunit/framework/VisualTestCaseTest.as
Async Test Case:
https://github.com/patternpark/asunit/blob/master/asunit-4.0/test/asunit/framework/AsyncMethodTest.as
We did quite a bit of work to introduce a "LegacyRunner" so that one
could use the new framework against a legacy project by simply
swapping out the existing main file - what used to be called a
'Runner', and test suite(s). I'm pretty sure that still works but
haven't confirmed in quite some time. This should make migration of
legacy projects simple and let you move one class at a time.
As far as generators go, it's basically the prerelease of Sprouts v1.
You can grab that with:
gem install sprout --pre
But you should only do this if you're on Ruby 1.9.2 and you can easily
switch Ruby/Gem versions (like with rvm or ruby_switcher).
Hope that helps!
Luke
--
You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.
To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to projectsprout...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/projectsprouts?hl=en
For other info you can visit our project at: http://projectsprouts.org, or on Github at: http://github.com/lukebayes/project-sprouts
If you're using the release version of Sprouts with the default task
helpers in your Rakefile and using the generators, I'd recommend
sticking with AsUnit 3 (for now).
If you really want to upgrade, you'll need to download the swc
(https://github.com/patternpark/asunit/zipball/4.0.3) and create a new
test task (delete the old one) that includes the library as if it's an
arbitrary swc file. You'll also need to avoid using the built-in
generators... :-(
In case you're still not persuaded...
Here's an example of an AS3 project Rakefile that doesn't use the task
'helpers':
https://gist.github.com/221569
You'll want to avoid the 'library :asunit3' line and just go ahead
with dropping the SWC into your lib dir and adding it to the
library_path of your test swf task.
Thanks,
Luke