diff --git a/framework/src/source/BaseTestSuite.bs b/framework/src/source/BaseTestSuite.bs index 2191ee8c..cff1093d 100644 --- a/framework/src/source/BaseTestSuite.bs +++ b/framework/src/source/BaseTestSuite.bs @@ -1126,7 +1126,7 @@ namespace rooibos return false end if if rooibos.Common.isFunction(func) - func = value.toStr().mid(10).replace("_", ".") + func = func.toStr().mid(10).replace("_", ".") end if try if not Rooibos.Common.isAssociativeArray(value) @@ -1137,8 +1137,8 @@ namespace rooibos m.currentResult.fail(msg, m.currentAssertLineNumber) return false end if - className = `${value.__classname}` - if className <> func + className = lCase(`${value.__classname}`) + if className <> lCase(func) if msg = "" msg = `Expected class: ${func} got ${className}` end if diff --git a/tests/src/source/Basic.spec.bs b/tests/src/source/Basic.spec.bs index 18e51614..04af20b6 100644 --- a/tests/src/source/Basic.spec.bs +++ b/tests/src/source/Basic.spec.bs @@ -119,6 +119,18 @@ namespace tests m.assertFalse(isFail) end function + @it("passes If Is correct Class as reference") + function _() + m.assertClass({ + __classname: "rooibos.BaseTestSuite" + }, rooibos.BaseTestSuite) + isFail = m.currentResult.isFail + + m.currentResult.Reset() + + m.assertFalse(isFail) + end function + '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @describe("assertAAContainsSubset") '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++