ColdBox Framework Forums Notification: Post to Using getPlugin() in cfcUnit creates error with coldbox controller (coldspring)

Title: RE: Using getPlugin() in cfcUnit creates error with coldbox controller (coldspring)
Thread: Using getPlugin() in cfcUnit creates error with coldbox controller (coldspring)
Forum: Need Help?
Conference: ColdBox
User: lmajano Ok, more on this topic.

I actually have a unit test of my own working with
this. How? Well, Look at the code below:

[code]

<cffunction name="setUp"
returntype="void" access="private" output="false">
  <cfscript>
  //Setup
ColdBox Mappings For this Test
  setAppMapping("/coldbox");
setConfigMapping(ExpandPath(instance.AppMapping & "/config/coldbox.xml.cfm"));
//Call the super setup method to setup the app.
  super.setup();
  //place
controller in app scope for this.
  application.cbController = getController();
</cfscript>
</cffunction>

<!--- tearDown --->
<cffunction
name="tearDown" output="false" access="public" returntype="void" hint="">
<cfscript>
  structDelete(application,"cbController");
  </cfscript>
</cffunction>
[/code]

As you can see, I setup the controller in the setup
method and tear it down from scope in my tearDown method. This will absolutely
work.

Would you guys consider this as the official workaround, or the whole
solution 1 might be too much?

Luis.
http://forums.coldboxframework.com/index.cfm?event=ehMessages.dspMessages&threadid=8A6EC886-FF65-CEF6-65606CFA2E50F4BA