Fixed
Pinned fields
Click on the next to a field label to start pinning.
Created April 8, 2014 at 1:10 PM
Updated April 8, 2014 at 4:32 PM
Resolved April 8, 2014 at 4:32 PM
BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io
Adding custom assertions from a cfc fails using the addAssertions() method:
public any function beforeAll() { variables.startDate = dateAdd("m",-1,Now()); variables.endDate = Now(); addAssertions("framework.plugins.testbox.Assertions"); return this; }
With the following error message:
Message Can't cast Complex Object Type Array to String Detail Use Built-In-Function "serialize(Array):String" to create a String from Array Stacktrace testbox\system\testing\BaseSpec.cfc: line 348 346: var methodArray = structKeyArray( oAssertions ); 347: for( var thisMethod in methodArray ){ 348: this.$assert[ thisMethod ] = oAssertions[ methodArray ]; 349: } 350:
The bug appears to be on line 348 where you are trying to use the actual array as the key rather than the actual key variable, the line should be:
this.$assert[ thisMethod ] = oAssertions[ thisMethod ];