Skip to content

Instantly share code, notes, and snippets.

View Stray's full-sized avatar

Stray Stray

  • Innerleithen, Scotland
View GitHub Profile
# rake file sugar for project sprouts
# to specify a package to be tested: rake testpackage['packagename']
# you can also use a package name that recurs as a filter: rake testpackage['api']
# if you like, you can be more specific: rake testpackage['somepackage.model']
# to restore all tests: rake testall
package com.client.application.xendtoendtests {
import asunit.framework.TestCase;
import applicationShell;
import shell.applicationShellSkin;
import com.newloop.roboteyes.inViewOf;
import com.newloop.roboteyes.core.RobotEyes;
package app.restricted.services {
import asunit.framework.TestCase;
import org.robotlegs.mvcs.Actor;
import mockolate.prepare;
import mockolate.nice;
import mockolate.stub;
package app.restricted.controller.commands {
import asunit.framework.TestCase;
import org.robotlegs.mvcs.Command;
import flash.events.Event;
import flash.events.IEventDispatcher;
import mockolate.prepare;
import mockolate.nice;
package app.restricted.view.overlays {
import asunit.framework.TestCase;
import org.robotlegs.mvcs.Mediator;
import mockolate.prepare;
import mockolate.nice;
import mockolate.stub;
import mockolate.verify;
package
{
import flash.display.MovieClip;
public class FrameScriptManager extends Object
{
private var _targetMC:MovieClip;
private var _frameNumbersToFunctionsArray:Array;
public function FrameScriptManager(targetMC:MovieClip)
// I started to notice that my test count was increasing exponentially.
// So I placed a trace in the 'startTest' func of asunit.framework.TestResult (line 120)
public function startTest(test:Test):void {
var count:int = test.countTestCases();
fRunTests += count;
trace("startTest: " + test + " => " + count + " : " + fRunTests);
// This causes repeated test running:
override public function run():void{
var mockolateMaker:IEventDispatcher = prepare(Sprite);
mockolateMaker.addEventListener(Event.COMPLETE, prepareCompleteHandler, false, 0, true);
}
private function prepareCompleteHandler(e:Event):void{
super.run();
}
@Stray
Stray / SomeClassA.as
Created October 15, 2010 14:54
Code implementing an isNot(c:Class):Boolean function on the Object prototype
package com.newloop.experiments.isnot {
public class SomeClassA extends SomeClassB {
public function SomeClassA() {
}
}
}
@Stray
Stray / AccountDataLoadingService.as
Created October 18, 2010 14:55
Interface for loading services
public class AccountDataLoadingService extends AdminDataLoadingService {
public function AccountDataLoadingService()
{
_loadingDataVOType = AccountDataVO;
super();
}
override protected function processLoadedData(urlVars:URLVariables):void