use super::ruby_string_literal;
use crate::e2e::codegen::inert_example::{InertCause, InertExample};
pub(super) fn render_refused_example(description_literal: &str, markers: &str, refusal: &InertExample) -> String {
let markers: Vec<_> = markers
.lines()
.filter(|line| !line.trim().is_empty())
.map(str::trim_end)
.collect();
crate::e2e::template_env::render(
"ruby/refused_example.jinja",
crate::alef_context! {
description => description_literal, markers => markers, reason => ruby_string_literal(&refusal.reason()),
unresolved => refusal.cause == InertCause::UnresolvedFieldPath,
},
)
}