forked from jasmine/jasmine
A simple project
BrianGenisio edited this page Apr 4, 2011
·
4 revisions
To use Jasmine-Flex, create a new Flex project (Flash or Air). Download the JasmineFlex.swc file and put it in your libs folder. Add the TrivialFlexReporterView
to your main view and set autoExecute
to true
. Add references to your specs via the <script>
tags. Here is an excerpt from the Example project:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
xmlns:flexreporter="org.jasmineflex.flexreporter.*">
<fx:Script source="spec/SpecHelper.as" />
<fx:Script source="spec/PlayerSpec.as" />
<flexreporter:TrivialFlexReporterView width="100%" height="100%" autoExecute="true" />
</s:Application>
Now, run your app. If something fails, you will get a red error message. If everything passes, it will show up green.
As you add new specs to your project, make sure to add spec <script>
tags.