quickdraw/compilation_equivalence_cases/modifier_conditionals.rb

Lines

0%

0 of 16 covered

Branches

0%

0 of 6 covered

Methods

0%

0 of 3 covered

Not run
3-8111317-24
Never called
1# frozen_string_literal: true
2
30module EquivalenceCases
40 module ModifierConditionals
50 class ModifierConditionals < Phlex::HTML
60 def initialize(flag: false)
70 @flag = flag
80 @content = "content"
9 end
10
110 def self.equivalence_scenarios
12 {
130 "flag on" => -> (klass) { klass.new(flag: true).call },
14 }
15 end
16
170 def view_template
180 b { "always" }
190 span(class: "x") { plain @content } if @flag
200 em { @content } unless @flag
210 count = 0
220 p { plain "loop #{count += 1}" } while count < 2 && @flag
230 strong { count.to_s } until true
240 i { "end" }
25 end
26 end
27 end
28end