quickdraw/compilation_equivalence_cases/empty_keyword_splat.rb
Lines
0%0 of 12 covered
Branches
—0 of 0 covered
Methods
0%0 of 3 covered
- Not run
- 3-68-1013-17
- Never called
| 1 | # frozen_string_literal: true | |
| 2 | ||
| 3 | 0 | module EquivalenceCases |
| 4 | 0 | module EmptyKeywordSplat |
| 5 | 0 | class EmptyKeywordSplat < Phlex::HTML |
| 6 | 0 | def self.equivalence_scenarios = { "with attributes" => -> (klass) { klass.new(id: "a").call } } |
| 7 | ||
| 8 | 0 | def initialize(**attrs) |
| 9 | 0 | @attrs = attrs |
| 10 | 0 | @nothing = nil |
| 11 | end | |
| 12 | ||
| 13 | 0 | def view_template |
| 14 | 0 | div(**@attrs) { "x" } |
| 15 | 0 | div(**{}) { "empty" } |
| 16 | 0 | div(**@nothing) { "nil" } |
| 17 | 0 | div(id: "b", **@nothing) { "nil with a key" } |
| 18 | end | |
| 19 | end | |
| 20 | end | |
| 21 | end |