I am working with cfcUnit in an existing application that includes a generator 
type functionality.  Every time the generator is run, the unit test cfcs are 
overwritten wiping out any custom test functions.  So, I am trying to use a 
cfinclude to include a separate cfm file that has just the custom test 
functions in it as follows ...

<cfcomponent displayname="AddressTest" output="false" 
extends="org.cfcunit.framework.TestCase"
        hint="unit test for Address business object" >
        
        <!---
        SET-UP
        --->
        <cfset variables.Address = "" />
        <cffunction name="setUp" returntype="void" access="private" >
                <cfset variables.Address = CreateObject("component", "Address") 
/>
        </cffunction>

        <!---
        TESTS
        --->
        <cfinclude template="AddressTest-Functions.cfm" />

</cfcomponent>

However, when I run this through the cfcUnit test runner, it comes back with an 
error that there are no test functions.  If I instantiate this object and then 
dump it, I can see all of the included test functions.  Does cfcUnit not handle 
an include like this?

Thanks.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258614
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to