Repository navigation
fix(tests): make the implicit views renderer spec engine-independent - #743
Merged
Merged
Conversation
Call view() instead of the deprecated renderView() wrapper and compare plain type and detail strings instead of the caught exception object. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019aF6okUSkxZW3STzeV7Q9B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
RendererTest"explains that implicit views are disabled when no view is set" (added in #741, COLDBOX-1481) fails on Adobe 2023 and Adobe 2025 withrenderView() should have thrown, and has been red ondevelopmentsince that merge. BoxLang and Lucee pass.Cause (spec only, no framework bug): the spec stored the caught exception and asserted
expect( thrown ).notToBeEmpty(). TestBox sizes the target ingetTargetLength(), which only counts strings, arrays, structs, queries and sets. On Adobe the caught exception is acoldfusion.runtime.CustomExceptionJava object (isObjecttrue,isStructfalse), so its length is 0 and it reads as empty even thoughview()did throw. On BoxLang and Lucee the caught exception is a struct with keys, so the same assertion passes. I confirmed this on Adobe 2023 with a standalone probe and by reading TestBox'sgetTargetLength().Change: the spec now calls
view()directly (the deprecatedrenderView()wrapper is not what is under test) and keeps only the exceptiontypeanddetailas plain strings, so no engine-specific exception object reaches an assertion. The assertions about the message content are unchanged. No framework code changes.Verification: the Adobe probe shows
e.typeis readable on the caught exception. The full spec could not run locally because the test harness needs MySQL, so Adobe 2023 and 2025 CI on this PR is the end-to-end check.Jira Issues
Follow up to https://ortussolutions.atlassian.net/browse/COLDBOX-1481
Type of change
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_019aF6okUSkxZW3STzeV7Q9B