quickdraw/compilation_equivalence_cases/conditional_using.rb
Lines
0%0 of 10 covered
Branches
0%0 of 2 covered
Methods
0%0 of 2 covered
- Not run
- 3-61214-18
- Never called
| 1 | # frozen_string_literal: true | |
| 2 | ||
| 3 | 0 | module EquivalenceCases |
| 4 | 0 | module ConditionalUsing |
| 5 | 0 | module Shout |
| 6 | 0 | refine(String) { def shout = upcase + "!" } |
| 7 | end | |
| 8 | end | |
| 9 | end | |
| 10 | ||
| 11 | # Copied as a plain `using`, this would refine strings the original didn't. | |
| 12 | 0 | using EquivalenceCases::ConditionalUsing::Shout if ENV.key?("PHLEX_NEVER_SET") |
| 13 | ||
| 14 | 0 | module EquivalenceCases |
| 15 | 0 | module ConditionalUsing |
| 16 | 0 | class ConditionalUsing < Phlex::HTML |
| 17 | 0 | def view_template |
| 18 | 0 | div { "hi".respond_to?(:shout).to_s } |
| 19 | end | |
| 20 | end | |
| 21 | end | |
| 22 | end |