diff --git a/lib/phlex/testing/basic.rb b/lib/phlex/testing/basic.rb new file mode 100644 index 00000000..bdf9f0d4 --- /dev/null +++ b/lib/phlex/testing/basic.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module Phlex + module Testing + module Basic + def render(view, &) + if view.is_a?(Class) && view < Phlex::SGML + view = view.new + end + + view.call(view_context:, &) + end + + def view_context + nil + end + end + + # Create an alias for the Basic module + ViewHelper = Basic + end +end