diff --git a/test/snapshot_utils.rb b/test/snapshot_utils.rb
index 562df24ec..4a2b5b6f6 100644
--- a/test/snapshot_utils.rb
+++ b/test/snapshot_utils.rb
@@ -85,15 +85,15 @@ def assert_evaluated_snapshot(source, locals = {}, options = {}, **kwargs)
def snapshot_changed?(content, source, options = {})
if snapshot_file(source, options).exist?
- previous_content = snapshot_file(source, options).read
+ previous_full_snapshot = snapshot_file(source, options).read
+ current_full_snapshot = format_snapshot_with_metadata(content, source, options)
- if previous_content == content
+ if previous_full_snapshot == current_full_snapshot
puts "\n\nSnapshot for '#{class_name} #{name}' didn't change: \n#{snapshot_file(source, options)}\n"
false
else
puts "\n\nSnapshot for '#{class_name} #{name}' changed:\n"
-
- puts Difftastic::Differ.new(color: :always).diff_strings(previous_content, content)
+ puts Difftastic::Differ.new(color: :always).diff_strings(previous_full_snapshot, current_full_snapshot)
puts "==============="
true
end
@@ -116,7 +116,7 @@ def save_failures_to_snapshot(content, source, options = {})
puts "\nUpdating Snapshot for '#{class_name} #{name}' at: \n#{snapshot_file(source, options)}\n"
FileUtils.mkdir_p(snapshot_file(source, options).dirname)
- snapshot_file(source, options).write(content)
+ snapshot_file(source, options).write(format_snapshot_with_metadata(content, source, options))
puts "\nSnapshot for '#{class_name} #{name}' written: \n#{snapshot_file(source, options)}\n"
else
@@ -128,13 +128,19 @@ def assert_snapshot_matches(actual, source, options = {})
assert snapshot_file(source, options).exist?,
"Expected snapshot file to exist: \n#{snapshot_file(source, options).to_path}"
- assert_equal snapshot_file(source, options).read, actual
+ expected_full_snapshot = snapshot_file(source, options).read
+ actual_full_snapshot = format_snapshot_with_metadata(actual, source, options)
+
+ assert_equal expected_full_snapshot, actual_full_snapshot
rescue Minitest::Assertion => e
save_failures_to_snapshot(actual, source, options) if ENV["UPDATE_SNAPSHOTS"] || ENV["FORCE_UPDATE_SNAPSHOTS"]
raise unless snapshot_file(source, options).exist?
- if snapshot_file(source, options)&.read != actual
+ expected_full_snapshot = snapshot_file(source, options).read
+ actual_full_snapshot = format_snapshot_with_metadata(actual, source, options)
+
+ if expected_full_snapshot != actual_full_snapshot
puts
divider = "=" * `tput cols`.strip.to_i
@@ -142,7 +148,7 @@ def assert_snapshot_matches(actual, source, options = {})
flunk(<<~MESSAGE)
\e[0m
#{divider}
- #{Difftastic::Differ.new(color: :always).diff_strings(snapshot_file(source, options).read, actual)}
+ #{Difftastic::Differ.new(color: :always).diff_strings(expected_full_snapshot, actual_full_snapshot)}
\e[31m#{divider}
Snapshots for "#{class_name} #{name}" didn't match.
@@ -266,6 +272,42 @@ def compare_with_erubi_evaluated(source, herb_result, locals, options, enforce_e
end
end
+ def format_snapshot_with_metadata(content, source, options = {})
+ metadata = build_snapshot_metadata(source, options)
+
+ frontmatter = "---\n"
+ frontmatter += "source: #{metadata["source"].inspect}\n"
+
+ # Use YAML literal block scalar for input (preserves formatting)
+ input_value = metadata["input"]
+ if input_value.include?("\n")
+ # Multiline: use |2- which means start content at column 0 (strip trailing newline)
+ frontmatter += "input: |2-\n"
+ frontmatter += input_value
+ # Ensure there's a newline after the multiline block
+ frontmatter += "\n" unless frontmatter.end_with?("\n")
+ else
+ # Single line: use regular quoted format
+ frontmatter += "input: #{input_value.inspect}\n"
+ end
+
+ frontmatter += "options: #{metadata["options"].inspect}\n" if metadata["options"]
+
+ frontmatter += "---\n"
+
+ frontmatter + content
+ end
+
+ def build_snapshot_metadata(source, options = {})
+ metadata = {
+ "source" => "#{class_name}##{name}",
+ "input" => source.to_s,
+ }
+
+ metadata["options"] = options unless options.empty?
+ metadata
+ end
+
private
def sanitize_name_for_filesystem(name)
diff --git a/test/snapshots/analyze/begin_test/test_0001_single-line_begin_8c71cb17a972281fb729047b56de5718.txt b/test/snapshots/analyze/begin_test/test_0001_single-line_begin_8c71cb17a972281fb729047b56de5718.txt
index 67989928b..0ad3566d0 100644
--- a/test/snapshots/analyze/begin_test/test_0001_single-line_begin_8c71cb17a972281fb729047b56de5718.txt
+++ b/test/snapshots/analyze/begin_test/test_0001_single-line_begin_8c71cb17a972281fb729047b56de5718.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::BeginTest#test_0001_single-line begin"
+input: |2-
+<% begin; end; %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:17))
diff --git a/test/snapshots/analyze/begin_test/test_0002_begin_statement_310fa78692cbba763c6e961782acf077.txt b/test/snapshots/analyze/begin_test/test_0002_begin_statement_310fa78692cbba763c6e961782acf077.txt
index b79e6040f..9f1f74f59 100644
--- a/test/snapshots/analyze/begin_test/test_0002_begin_statement_310fa78692cbba763c6e961782acf077.txt
+++ b/test/snapshots/analyze/begin_test/test_0002_begin_statement_310fa78692cbba763c6e961782acf077.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BeginTest#test_0002_begin statement"
+input: |2-
+<% begin %>
+ begin
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBeginNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/begin_test/test_0003_begin_statement_wrapped_in_element_90dff6e715c904a974e86da2330e3795.txt b/test/snapshots/analyze/begin_test/test_0003_begin_statement_wrapped_in_element_90dff6e715c904a974e86da2330e3795.txt
index 62defd9c1..fb6dd4e15 100644
--- a/test/snapshots/analyze/begin_test/test_0003_begin_statement_wrapped_in_element_90dff6e715c904a974e86da2330e3795.txt
+++ b/test/snapshots/analyze/begin_test/test_0003_begin_statement_wrapped_in_element_90dff6e715c904a974e86da2330e3795.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::BeginTest#test_0003_begin statement wrapped in element"
+input: |2-
+
+ <% begin %>
+ begin
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(5:5))
diff --git a/test/snapshots/analyze/begin_test/test_0004_begin_with_rescue_0abd830734a05969547e9b7f744deccd.txt b/test/snapshots/analyze/begin_test/test_0004_begin_with_rescue_0abd830734a05969547e9b7f744deccd.txt
index cafbaec9d..41d012ad0 100644
--- a/test/snapshots/analyze/begin_test/test_0004_begin_with_rescue_0abd830734a05969547e9b7f744deccd.txt
+++ b/test/snapshots/analyze/begin_test/test_0004_begin_with_rescue_0abd830734a05969547e9b7f744deccd.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::BeginTest#test_0004_begin with rescue"
+input: |2-
+<% begin %>
+ begin
+<% rescue %>
+ rescue
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBBeginNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/begin_test/test_0005_begin_with_ensure_652af15ee9468a11e54d5661deb00e99.txt b/test/snapshots/analyze/begin_test/test_0005_begin_with_ensure_652af15ee9468a11e54d5661deb00e99.txt
index 58ad1a07d..f923c7eef 100644
--- a/test/snapshots/analyze/begin_test/test_0005_begin_with_ensure_652af15ee9468a11e54d5661deb00e99.txt
+++ b/test/snapshots/analyze/begin_test/test_0005_begin_with_ensure_652af15ee9468a11e54d5661deb00e99.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::BeginTest#test_0005_begin with ensure"
+input: |2-
+<% begin %>
+ begin
+<% ensure %>
+ ensure
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBBeginNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/begin_test/test_0006_begin_with_else_85973b5966518a564209caa19c09f1e2.txt b/test/snapshots/analyze/begin_test/test_0006_begin_with_else_85973b5966518a564209caa19c09f1e2.txt
index 97d5d4ce4..7e555211b 100644
--- a/test/snapshots/analyze/begin_test/test_0006_begin_with_else_85973b5966518a564209caa19c09f1e2.txt
+++ b/test/snapshots/analyze/begin_test/test_0006_begin_with_else_85973b5966518a564209caa19c09f1e2.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::BeginTest#test_0006_begin with else"
+input: |2-
+<% begin %>
+ begin
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
├── errors: (1 error)
│ └── @ RubyParseError (location: (3:3)-(5:6))
diff --git a/test/snapshots/analyze/begin_test/test_0007_begin_with_rescue_and_else_5ff2a3e329235a33a89faff9c8647173.txt b/test/snapshots/analyze/begin_test/test_0007_begin_with_rescue_and_else_5ff2a3e329235a33a89faff9c8647173.txt
index 355551e9b..1fd7a3f95 100644
--- a/test/snapshots/analyze/begin_test/test_0007_begin_with_rescue_and_else_5ff2a3e329235a33a89faff9c8647173.txt
+++ b/test/snapshots/analyze/begin_test/test_0007_begin_with_rescue_and_else_5ff2a3e329235a33a89faff9c8647173.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::BeginTest#test_0007_begin with rescue and else"
+input: |2-
+<% begin %>
+ begin
+<% rescue %>
+ rescue
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBBeginNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/begin_test/test_0008_begin_with_rescue_and_ensure_97df51331597aef274a1e1a6d1fa05ab.txt b/test/snapshots/analyze/begin_test/test_0008_begin_with_rescue_and_ensure_97df51331597aef274a1e1a6d1fa05ab.txt
index 2a9ee1a3b..407851918 100644
--- a/test/snapshots/analyze/begin_test/test_0008_begin_with_rescue_and_ensure_97df51331597aef274a1e1a6d1fa05ab.txt
+++ b/test/snapshots/analyze/begin_test/test_0008_begin_with_rescue_and_ensure_97df51331597aef274a1e1a6d1fa05ab.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::BeginTest#test_0008_begin with rescue and ensure"
+input: |2-
+<% begin %>
+ begin
+<% rescue %>
+ rescue
+<% ensure %>
+ ensure
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBBeginNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/begin_test/test_0009_begin_with_multiple_rescues_b391d083604ab993f87d7b5f7da784de.txt b/test/snapshots/analyze/begin_test/test_0009_begin_with_multiple_rescues_b391d083604ab993f87d7b5f7da784de.txt
index 467b10de1..a08b7d163 100644
--- a/test/snapshots/analyze/begin_test/test_0009_begin_with_multiple_rescues_b391d083604ab993f87d7b5f7da784de.txt
+++ b/test/snapshots/analyze/begin_test/test_0009_begin_with_multiple_rescues_b391d083604ab993f87d7b5f7da784de.txt
@@ -1,3 +1,16 @@
+---
+source: "Analyze::BeginTest#test_0009_begin with multiple rescues"
+input: |2-
+<% begin %>
+ begin
+<% rescue StandardError %>
+ StandardError
+<% rescue ArgumentError %>
+ ArgumentError
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(10:0))
└── children: (2 items)
├── @ ERBBeginNode (location: (1:0)-(9:9))
diff --git a/test/snapshots/analyze/begin_test/test_0010_begin_with_rescue,_ensure,_and_else_7e05a59142cd6be0bdc4a05fbe46ca11.txt b/test/snapshots/analyze/begin_test/test_0010_begin_with_rescue,_ensure,_and_else_7e05a59142cd6be0bdc4a05fbe46ca11.txt
index 703f217d1..39b6fd851 100644
--- a/test/snapshots/analyze/begin_test/test_0010_begin_with_rescue,_ensure,_and_else_7e05a59142cd6be0bdc4a05fbe46ca11.txt
+++ b/test/snapshots/analyze/begin_test/test_0010_begin_with_rescue,_ensure,_and_else_7e05a59142cd6be0bdc4a05fbe46ca11.txt
@@ -1,3 +1,16 @@
+---
+source: "Analyze::BeginTest#test_0010_begin with rescue, ensure, and else"
+input: |2-
+<% begin %>
+ begin
+<% rescue %>
+ rescue
+<% else %>
+ else
+<% ensure %>
+ ensure
+<% end %>
+---
@ DocumentNode (location: (1:0)-(10:0))
└── children: (2 items)
├── @ ERBBeginNode (location: (1:0)-(9:9))
diff --git a/test/snapshots/analyze/begin_test/test_0011_nested_begin_statements_df42b2e75ecfbebde2efc7179c9a6a88.txt b/test/snapshots/analyze/begin_test/test_0011_nested_begin_statements_df42b2e75ecfbebde2efc7179c9a6a88.txt
index 2e8c1d0ea..d9392bf12 100644
--- a/test/snapshots/analyze/begin_test/test_0011_nested_begin_statements_df42b2e75ecfbebde2efc7179c9a6a88.txt
+++ b/test/snapshots/analyze/begin_test/test_0011_nested_begin_statements_df42b2e75ecfbebde2efc7179c9a6a88.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::BeginTest#test_0011_nested begin statements"
+input: |2-
+<% begin %>
+ Level 1
+
+ <% begin %>
+ Level 2
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBBeginNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/block_test/test_0001_single_line_block_6e95c5888a720e157b1e6ec923700b92.txt b/test/snapshots/analyze/block_test/test_0001_single_line_block_6e95c5888a720e157b1e6ec923700b92.txt
index d36ebb751..74229f261 100644
--- a/test/snapshots/analyze/block_test/test_0001_single_line_block_6e95c5888a720e157b1e6ec923700b92.txt
+++ b/test/snapshots/analyze/block_test/test_0001_single_line_block_6e95c5888a720e157b1e6ec923700b92.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::BlockTest#test_0001_single line block"
+input: |2-
+<% numbers.map { |number| number * 2 } %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:41))
diff --git a/test/snapshots/analyze/block_test/test_0002_block_bb47a5f1953b6af8f63923f01e574d97.txt b/test/snapshots/analyze/block_test/test_0002_block_bb47a5f1953b6af8f63923f01e574d97.txt
index 194db87f2..74f2784ed 100644
--- a/test/snapshots/analyze/block_test/test_0002_block_bb47a5f1953b6af8f63923f01e574d97.txt
+++ b/test/snapshots/analyze/block_test/test_0002_block_bb47a5f1953b6af8f63923f01e574d97.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0002_block"
+input: |2-
+<% block do %>
+ Content
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0003_block_with_curlies_1f0aa977e8f63e43e55f5c51eeb809c6.txt b/test/snapshots/analyze/block_test/test_0003_block_with_curlies_1f0aa977e8f63e43e55f5c51eeb809c6.txt
index 8e518f936..2880dec1f 100644
--- a/test/snapshots/analyze/block_test/test_0003_block_with_curlies_1f0aa977e8f63e43e55f5c51eeb809c6.txt
+++ b/test/snapshots/analyze/block_test/test_0003_block_with_curlies_1f0aa977e8f63e43e55f5c51eeb809c6.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0003_block with curlies"
+input: |2-
+<% block { %>
+ Content
+<% } %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:7))
diff --git a/test/snapshots/analyze/block_test/test_0004_block_wrapped_in_element_39a5ad73c7d101fb93261a1168948d5b.txt b/test/snapshots/analyze/block_test/test_0004_block_wrapped_in_element_39a5ad73c7d101fb93261a1168948d5b.txt
index cb708f902..b14fe54bc 100644
--- a/test/snapshots/analyze/block_test/test_0004_block_wrapped_in_element_39a5ad73c7d101fb93261a1168948d5b.txt
+++ b/test/snapshots/analyze/block_test/test_0004_block_wrapped_in_element_39a5ad73c7d101fb93261a1168948d5b.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::BlockTest#test_0004_block wrapped in element"
+input: |2-
+
+ <% block do %>
+ Content
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(5:5))
diff --git a/test/snapshots/analyze/block_test/test_0005_each_block_12aad82c1dcc0c44ce4506dbdac4fbd5.txt b/test/snapshots/analyze/block_test/test_0005_each_block_12aad82c1dcc0c44ce4506dbdac4fbd5.txt
index da9349587..ea60d7854 100644
--- a/test/snapshots/analyze/block_test/test_0005_each_block_12aad82c1dcc0c44ce4506dbdac4fbd5.txt
+++ b/test/snapshots/analyze/block_test/test_0005_each_block_12aad82c1dcc0c44ce4506dbdac4fbd5.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0005_each block"
+input: |2-
+<% [1, 2, 3].each do |item| %>
+ <%= item %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0006_each_with_index_block_203756003c6f59594914718691890834.txt b/test/snapshots/analyze/block_test/test_0006_each_with_index_block_203756003c6f59594914718691890834.txt
index f90ce647d..17b17ee50 100644
--- a/test/snapshots/analyze/block_test/test_0006_each_with_index_block_203756003c6f59594914718691890834.txt
+++ b/test/snapshots/analyze/block_test/test_0006_each_with_index_block_203756003c6f59594914718691890834.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::BlockTest#test_0006_each_with_index block"
+input: |2-
+<% [1, 2, 3].each_with_index do |item, index| %>
+ <%= item %>
+ <%= index %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/block_test/test_0007_times_block_1533a1664dd8eebdaa2ebe88f35f1316.txt b/test/snapshots/analyze/block_test/test_0007_times_block_1533a1664dd8eebdaa2ebe88f35f1316.txt
index a708e56dc..7adfcd355 100644
--- a/test/snapshots/analyze/block_test/test_0007_times_block_1533a1664dd8eebdaa2ebe88f35f1316.txt
+++ b/test/snapshots/analyze/block_test/test_0007_times_block_1533a1664dd8eebdaa2ebe88f35f1316.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0007_times block"
+input: |2-
+<% 5.times do |i| %>
+ <%= i %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0008_upto_block_8163697cb75c2f0c085bbbbc587fe892.txt b/test/snapshots/analyze/block_test/test_0008_upto_block_8163697cb75c2f0c085bbbbc587fe892.txt
index 40df6e665..54c8bc532 100644
--- a/test/snapshots/analyze/block_test/test_0008_upto_block_8163697cb75c2f0c085bbbbc587fe892.txt
+++ b/test/snapshots/analyze/block_test/test_0008_upto_block_8163697cb75c2f0c085bbbbc587fe892.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0008_upto block"
+input: |2-
+<% 1.upto(5) do |i| %>
+ <%= i %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0009_step_block_46c8130e027d324f1bc60a66ac2fd9d9.txt b/test/snapshots/analyze/block_test/test_0009_step_block_46c8130e027d324f1bc60a66ac2fd9d9.txt
index c912ba576..570612cf2 100644
--- a/test/snapshots/analyze/block_test/test_0009_step_block_46c8130e027d324f1bc60a66ac2fd9d9.txt
+++ b/test/snapshots/analyze/block_test/test_0009_step_block_46c8130e027d324f1bc60a66ac2fd9d9.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0009_step block"
+input: |2-
+<% 1.step(5, 2) do |i| %>
+ <%= i %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0010_loop_block_b6292ce38564be66a47b39c7cd7c0154.txt b/test/snapshots/analyze/block_test/test_0010_loop_block_b6292ce38564be66a47b39c7cd7c0154.txt
index dac3569f0..12d8e8256 100644
--- a/test/snapshots/analyze/block_test/test_0010_loop_block_b6292ce38564be66a47b39c7cd7c0154.txt
+++ b/test/snapshots/analyze/block_test/test_0010_loop_block_b6292ce38564be66a47b39c7cd7c0154.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0010_loop block"
+input: |2-
+<% loop do %>
+ loop
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0011_nested_blocks_5c1db84edbee554e4c974962dd664115.txt b/test/snapshots/analyze/block_test/test_0011_nested_blocks_5c1db84edbee554e4c974962dd664115.txt
index 6e32c2b66..4aeb986be 100644
--- a/test/snapshots/analyze/block_test/test_0011_nested_blocks_5c1db84edbee554e4c974962dd664115.txt
+++ b/test/snapshots/analyze/block_test/test_0011_nested_blocks_5c1db84edbee554e4c974962dd664115.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::BlockTest#test_0011_nested blocks"
+input: |2-
+<% block do %>
+ Level 1
+
+ <% block do %>
+ Level 2
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/block_test/test_0012_output_block_with_nested_if_in_arguments_6e476a363d4ba2c11b5a7880f29eb97e.txt b/test/snapshots/analyze/block_test/test_0012_output_block_with_nested_if_in_arguments_6e476a363d4ba2c11b5a7880f29eb97e.txt
index 75c480e76..5e4d2ea67 100644
--- a/test/snapshots/analyze/block_test/test_0012_output_block_with_nested_if_in_arguments_6e476a363d4ba2c11b5a7880f29eb97e.txt
+++ b/test/snapshots/analyze/block_test/test_0012_output_block_with_nested_if_in_arguments_6e476a363d4ba2c11b5a7880f29eb97e.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0012_output block with nested if in arguments"
+input: |2-
+<%= link_to(some_url, class: ("some-class" if some_condition)) do %>
+ Click me
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0013_output_block_with_complex_nested_if_in_arguments_ce77a6b79077c840b8e3757d685241db.txt b/test/snapshots/analyze/block_test/test_0013_output_block_with_complex_nested_if_in_arguments_ce77a6b79077c840b8e3757d685241db.txt
index cebdd2af8..82e3defe5 100644
--- a/test/snapshots/analyze/block_test/test_0013_output_block_with_complex_nested_if_in_arguments_ce77a6b79077c840b8e3757d685241db.txt
+++ b/test/snapshots/analyze/block_test/test_0013_output_block_with_complex_nested_if_in_arguments_ce77a6b79077c840b8e3757d685241db.txt
@@ -1,3 +1,20 @@
+---
+source: "Analyze::BlockTest#test_0013_output block with complex nested if in arguments"
+input: |2-
+<%= form_builder.fieldset(
+ "foo",
+ :foo,
+ required: true,
+ hint:
+ if some_condition?
+ "foo"
+ else
+ "bar"
+ end
+) do %>
+ <%# ... %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(14:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(13:9))
diff --git a/test/snapshots/analyze/block_test/test_0014_output_block_with_ternary_in_arguments_fd95ec37953c2bfabb5e6c134048e826.txt b/test/snapshots/analyze/block_test/test_0014_output_block_with_ternary_in_arguments_fd95ec37953c2bfabb5e6c134048e826.txt
index 7e4976f14..6972b04cd 100644
--- a/test/snapshots/analyze/block_test/test_0014_output_block_with_ternary_in_arguments_fd95ec37953c2bfabb5e6c134048e826.txt
+++ b/test/snapshots/analyze/block_test/test_0014_output_block_with_ternary_in_arguments_fd95ec37953c2bfabb5e6c134048e826.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0014_output block with ternary in arguments"
+input: |2-
+<%= button_to(path, class: active? ? "active" : "inactive") do %>
+ Button text
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0015_non-output_block_with_nested_if_in_arguments_03b142f7bfa9e9b1adfd3d1ce93f664c.txt b/test/snapshots/analyze/block_test/test_0015_non-output_block_with_nested_if_in_arguments_03b142f7bfa9e9b1adfd3d1ce93f664c.txt
index b4233fc74..f2431ab7b 100644
--- a/test/snapshots/analyze/block_test/test_0015_non-output_block_with_nested_if_in_arguments_03b142f7bfa9e9b1adfd3d1ce93f664c.txt
+++ b/test/snapshots/analyze/block_test/test_0015_non-output_block_with_nested_if_in_arguments_03b142f7bfa9e9b1adfd3d1ce93f664c.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0015_non-output block with nested if in arguments"
+input: |2-
+<% link_to(some_url, class: ("some-class" if some_condition)) do %>
+ Click me
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0016_block_with_multiple_nested_control_structures_6ef4d5a78134131b297c942bf88a2f27.txt b/test/snapshots/analyze/block_test/test_0016_block_with_multiple_nested_control_structures_6ef4d5a78134131b297c942bf88a2f27.txt
index 41219c5c0..daf0e5b18 100644
--- a/test/snapshots/analyze/block_test/test_0016_block_with_multiple_nested_control_structures_6ef4d5a78134131b297c942bf88a2f27.txt
+++ b/test/snapshots/analyze/block_test/test_0016_block_with_multiple_nested_control_structures_6ef4d5a78134131b297c942bf88a2f27.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::BlockTest#test_0016_block with multiple nested control structures"
+input: |2-
+<%= items.select { |item| item.valid? }.map do |item| %>
+
+ <%= item.name %>
+
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/block_test/test_0017_output_block_with_nested_if_and_empty_body_e7620bceca76d49a706d7ed00e44c573.txt b/test/snapshots/analyze/block_test/test_0017_output_block_with_nested_if_and_empty_body_e7620bceca76d49a706d7ed00e44c573.txt
index 470be5d01..9fb49e037 100644
--- a/test/snapshots/analyze/block_test/test_0017_output_block_with_nested_if_and_empty_body_e7620bceca76d49a706d7ed00e44c573.txt
+++ b/test/snapshots/analyze/block_test/test_0017_output_block_with_nested_if_and_empty_body_e7620bceca76d49a706d7ed00e44c573.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::BlockTest#test_0017_output block with nested if and empty body"
+input: |2-
+<%= link_to(some_url, class: ("some-class" if some_condition)) do %>
+
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/block_test/test_0018_yield_with_conditional_expression_aab87ed84223dc1a927240b2859b3c05.txt b/test/snapshots/analyze/block_test/test_0018_yield_with_conditional_expression_aab87ed84223dc1a927240b2859b3c05.txt
index 1a7e74555..954a524ac 100644
--- a/test/snapshots/analyze/block_test/test_0018_yield_with_conditional_expression_aab87ed84223dc1a927240b2859b3c05.txt
+++ b/test/snapshots/analyze/block_test/test_0018_yield_with_conditional_expression_aab87ed84223dc1a927240b2859b3c05.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::BlockTest#test_0018_yield with conditional expression"
+input: |2-
+<%= yield(:header) if content_for?(:header) %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBYieldNode (location: (1:0)-(1:46))
diff --git a/test/snapshots/analyze/case_in_test/test_0001_case_in_statement_894c684a7c2d0c6e8fe725ed9e413c27.txt b/test/snapshots/analyze/case_in_test/test_0001_case_in_statement_894c684a7c2d0c6e8fe725ed9e413c27.txt
index 28da8a7d4..9172a886d 100644
--- a/test/snapshots/analyze/case_in_test/test_0001_case_in_statement_894c684a7c2d0c6e8fe725ed9e413c27.txt
+++ b/test/snapshots/analyze/case_in_test/test_0001_case_in_statement_894c684a7c2d0c6e8fe725ed9e413c27.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseInTest#test_0001_case in statement"
+input: |2-
+<% case variable %>
+<% in [Integer] %>
+ Integer
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseMatchNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_in_test/test_0002_case_in_statement_with_multiple_in_a2c476da06ea1cf6477de09d267c225d.txt b/test/snapshots/analyze/case_in_test/test_0002_case_in_statement_with_multiple_in_a2c476da06ea1cf6477de09d267c225d.txt
index f2e006da7..dc43de3d9 100644
--- a/test/snapshots/analyze/case_in_test/test_0002_case_in_statement_with_multiple_in_a2c476da06ea1cf6477de09d267c225d.txt
+++ b/test/snapshots/analyze/case_in_test/test_0002_case_in_statement_with_multiple_in_a2c476da06ea1cf6477de09d267c225d.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseInTest#test_0002_case in statement with multiple in"
+input: |2-
+<% case variable %>
+<% in [String] %>
+ String
+<% in [Integer] %>
+ Integer
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseMatchNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_in_test/test_0003_case_in_statement_with_else_627b23a581abbe9abf0dfe9014d759d7.txt b/test/snapshots/analyze/case_in_test/test_0003_case_in_statement_with_else_627b23a581abbe9abf0dfe9014d759d7.txt
index a4b697997..7ac149d07 100644
--- a/test/snapshots/analyze/case_in_test/test_0003_case_in_statement_with_else_627b23a581abbe9abf0dfe9014d759d7.txt
+++ b/test/snapshots/analyze/case_in_test/test_0003_case_in_statement_with_else_627b23a581abbe9abf0dfe9014d759d7.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseInTest#test_0003_case in statement with else"
+input: |2-
+<% case variable %>
+<% in [String] %>
+ String
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseMatchNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_in_test/test_0004_case_in_statement_with_multiple_in_and_else_db516a41f10230a12864d988e29f289e.txt b/test/snapshots/analyze/case_in_test/test_0004_case_in_statement_with_multiple_in_and_else_db516a41f10230a12864d988e29f289e.txt
index 63c976ac2..efa422b07 100644
--- a/test/snapshots/analyze/case_in_test/test_0004_case_in_statement_with_multiple_in_and_else_db516a41f10230a12864d988e29f289e.txt
+++ b/test/snapshots/analyze/case_in_test/test_0004_case_in_statement_with_multiple_in_and_else_db516a41f10230a12864d988e29f289e.txt
@@ -1,3 +1,15 @@
+---
+source: "Analyze::CaseInTest#test_0004_case in statement with multiple in and else"
+input: |2-
+<% case variable %>
+<% in [String] %>
+ String
+<% in [Integer] %>
+ Integer
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(9:0))
└── children: (2 items)
├── @ ERBCaseMatchNode (location: (1:0)-(8:9))
diff --git a/test/snapshots/analyze/case_in_test/test_0005_case_in_statement_wrapped_in_element_61e488dd472b63b98202b2d0e83c9610.txt b/test/snapshots/analyze/case_in_test/test_0005_case_in_statement_wrapped_in_element_61e488dd472b63b98202b2d0e83c9610.txt
index e9285125d..e89c490ca 100644
--- a/test/snapshots/analyze/case_in_test/test_0005_case_in_statement_wrapped_in_element_61e488dd472b63b98202b2d0e83c9610.txt
+++ b/test/snapshots/analyze/case_in_test/test_0005_case_in_statement_wrapped_in_element_61e488dd472b63b98202b2d0e83c9610.txt
@@ -1,3 +1,17 @@
+---
+source: "Analyze::CaseInTest#test_0005_case in statement wrapped in element"
+input: |2-
+
+ <% case variable %>
+ <% in [String] %>
+ String
+ <% in [Integer] %>
+ Integer
+ <% else %>
+ else
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(11:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(10:5))
diff --git a/test/snapshots/analyze/case_in_test/test_0007_case_in_with_children_before_first_in_48daaea0cd005bda78c99588a3d1fea2.txt b/test/snapshots/analyze/case_in_test/test_0007_case_in_with_children_before_first_in_48daaea0cd005bda78c99588a3d1fea2.txt
index c8bcc0110..1b946dea9 100644
--- a/test/snapshots/analyze/case_in_test/test_0007_case_in_with_children_before_first_in_48daaea0cd005bda78c99588a3d1fea2.txt
+++ b/test/snapshots/analyze/case_in_test/test_0007_case_in_with_children_before_first_in_48daaea0cd005bda78c99588a3d1fea2.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::CaseInTest#test_0007_case in with children before first in"
+input: |2-
+<% case variable %>
+ before in
+<% in [String] %>
+ String
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBCaseMatchNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/case_in_test/test_0008_case_in_with_block_inside_in_clause_a5d7393ef0ab780cd777fd4d09413ac8.txt b/test/snapshots/analyze/case_in_test/test_0008_case_in_with_block_inside_in_clause_a5d7393ef0ab780cd777fd4d09413ac8.txt
index c29867eb1..c7fe2ecf9 100644
--- a/test/snapshots/analyze/case_in_test/test_0008_case_in_with_block_inside_in_clause_a5d7393ef0ab780cd777fd4d09413ac8.txt
+++ b/test/snapshots/analyze/case_in_test/test_0008_case_in_with_block_inside_in_clause_a5d7393ef0ab780cd777fd4d09413ac8.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseInTest#test_0008_case in with block inside in clause"
+input: |2-
+<% case result %>
+<% in { status: :success } %>
+ <%= content_tag(:div) do %>
+ Success!
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseMatchNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_in_test/test_0009_case_in_with_multiple_blocks_in_in_clause_8cdfe954fcb68cf29f71d5c05893547c.txt b/test/snapshots/analyze/case_in_test/test_0009_case_in_with_multiple_blocks_in_in_clause_8cdfe954fcb68cf29f71d5c05893547c.txt
index 15df4180f..3bac9d007 100644
--- a/test/snapshots/analyze/case_in_test/test_0009_case_in_with_multiple_blocks_in_in_clause_8cdfe954fcb68cf29f71d5c05893547c.txt
+++ b/test/snapshots/analyze/case_in_test/test_0009_case_in_with_multiple_blocks_in_in_clause_8cdfe954fcb68cf29f71d5c05893547c.txt
@@ -1,3 +1,16 @@
+---
+source: "Analyze::CaseInTest#test_0009_case in with multiple blocks in in clause"
+input: |2-
+<% case data %>
+<% in { type: :alert } %>
+ <%= content_tag(:div) do %>
+ Alert
+ <% end %>
+ <%= content_tag(:span) do %>
+ Icon
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(10:0))
└── children: (2 items)
├── @ ERBCaseMatchNode (location: (1:0)-(9:9))
diff --git a/test/snapshots/analyze/case_in_test/test_0010_case_in_with_if_statement_inside_in_clause_51fcf7566215a5284ae1ee34c920837e.txt b/test/snapshots/analyze/case_in_test/test_0010_case_in_with_if_statement_inside_in_clause_51fcf7566215a5284ae1ee34c920837e.txt
index 5acba3aa5..2b3678df9 100644
--- a/test/snapshots/analyze/case_in_test/test_0010_case_in_with_if_statement_inside_in_clause_51fcf7566215a5284ae1ee34c920837e.txt
+++ b/test/snapshots/analyze/case_in_test/test_0010_case_in_with_if_statement_inside_in_clause_51fcf7566215a5284ae1ee34c920837e.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseInTest#test_0010_case in with if statement inside in clause"
+input: |2-
+<% case value %>
+<% in [Integer] %>
+ <% if positive? %>
+ Positive
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseMatchNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_test/test_0001_case_statement_29ef35b6c9d10898aadb09e127bb39ca.txt b/test/snapshots/analyze/case_test/test_0001_case_statement_29ef35b6c9d10898aadb09e127bb39ca.txt
index 7a20d2f39..af3ccf38a 100644
--- a/test/snapshots/analyze/case_test/test_0001_case_statement_29ef35b6c9d10898aadb09e127bb39ca.txt
+++ b/test/snapshots/analyze/case_test/test_0001_case_statement_29ef35b6c9d10898aadb09e127bb39ca.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::CaseTest#test_0001_case statement"
+input: |2-
+<% case variable %>
+<% when String %>
+ String
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/case_test/test_0002_case_statement_with_multiple_when_9e60754ef4d0f4e9601d4c74134c594d.txt b/test/snapshots/analyze/case_test/test_0002_case_statement_with_multiple_when_9e60754ef4d0f4e9601d4c74134c594d.txt
index 1a8aa0e93..dbdb753d5 100644
--- a/test/snapshots/analyze/case_test/test_0002_case_statement_with_multiple_when_9e60754ef4d0f4e9601d4c74134c594d.txt
+++ b/test/snapshots/analyze/case_test/test_0002_case_statement_with_multiple_when_9e60754ef4d0f4e9601d4c74134c594d.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseTest#test_0002_case statement with multiple when"
+input: |2-
+<% case variable %>
+<% when String %>
+ String
+<% when Integer %>
+ Integer
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_test/test_0003_case_statement_with_else_9707b40dd4e4f86f58c2dcd952525f80.txt b/test/snapshots/analyze/case_test/test_0003_case_statement_with_else_9707b40dd4e4f86f58c2dcd952525f80.txt
index 325744122..bd7e19345 100644
--- a/test/snapshots/analyze/case_test/test_0003_case_statement_with_else_9707b40dd4e4f86f58c2dcd952525f80.txt
+++ b/test/snapshots/analyze/case_test/test_0003_case_statement_with_else_9707b40dd4e4f86f58c2dcd952525f80.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseTest#test_0003_case statement with else"
+input: |2-
+<% case variable %>
+<% when String %>
+ String
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_test/test_0004_case_statement_with_multiple_when_and_else_6ecf2eb1af1609c6f998834e6454ce75.txt b/test/snapshots/analyze/case_test/test_0004_case_statement_with_multiple_when_and_else_6ecf2eb1af1609c6f998834e6454ce75.txt
index 0de572405..a1e07c121 100644
--- a/test/snapshots/analyze/case_test/test_0004_case_statement_with_multiple_when_and_else_6ecf2eb1af1609c6f998834e6454ce75.txt
+++ b/test/snapshots/analyze/case_test/test_0004_case_statement_with_multiple_when_and_else_6ecf2eb1af1609c6f998834e6454ce75.txt
@@ -1,3 +1,15 @@
+---
+source: "Analyze::CaseTest#test_0004_case statement with multiple when and else"
+input: |2-
+<% case variable %>
+<% when String %>
+ String
+<% when Integer %>
+ Integer
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(9:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(8:9))
diff --git a/test/snapshots/analyze/case_test/test_0005_case_statement_wrapped_in_element_8c0bd39fa334273e82d5abc8a735d433.txt b/test/snapshots/analyze/case_test/test_0005_case_statement_wrapped_in_element_8c0bd39fa334273e82d5abc8a735d433.txt
index 37e7aac92..4fd2687ac 100644
--- a/test/snapshots/analyze/case_test/test_0005_case_statement_wrapped_in_element_8c0bd39fa334273e82d5abc8a735d433.txt
+++ b/test/snapshots/analyze/case_test/test_0005_case_statement_wrapped_in_element_8c0bd39fa334273e82d5abc8a735d433.txt
@@ -1,3 +1,17 @@
+---
+source: "Analyze::CaseTest#test_0005_case statement wrapped in element"
+input: |2-
+
+ <% case variable %>
+ <% when String %>
+ String
+ <% when Integer %>
+ Integer
+ <% else %>
+ else
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(11:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(10:5))
diff --git a/test/snapshots/analyze/case_test/test_0007_case_with_children_before_first_when_f236195655edf63829effb2806e34ce0.txt b/test/snapshots/analyze/case_test/test_0007_case_with_children_before_first_when_f236195655edf63829effb2806e34ce0.txt
index bb5e06e38..e6f439737 100644
--- a/test/snapshots/analyze/case_test/test_0007_case_with_children_before_first_when_f236195655edf63829effb2806e34ce0.txt
+++ b/test/snapshots/analyze/case_test/test_0007_case_with_children_before_first_when_f236195655edf63829effb2806e34ce0.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::CaseTest#test_0007_case with children before first when"
+input: |2-
+<% case variable %>
+ before when
+<% when String %>
+ String
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/case_test/test_0008_case_with_block_inside_when_adb20c2773fe1206d2b47123f8001e22.txt b/test/snapshots/analyze/case_test/test_0008_case_with_block_inside_when_adb20c2773fe1206d2b47123f8001e22.txt
index e2e329787..fa2ffba24 100644
--- a/test/snapshots/analyze/case_test/test_0008_case_with_block_inside_when_adb20c2773fe1206d2b47123f8001e22.txt
+++ b/test/snapshots/analyze/case_test/test_0008_case_with_block_inside_when_adb20c2773fe1206d2b47123f8001e22.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseTest#test_0008_case with block inside when"
+input: |2-
+<% case 1 %>
+<% when 1 %>
+ <%= content_tag(:p) do %>
+ Yep
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_test/test_0009_case_with_multiple_blocks_in_when_05f7d387314a95620a58ddc7f7d31b7b.txt b/test/snapshots/analyze/case_test/test_0009_case_with_multiple_blocks_in_when_05f7d387314a95620a58ddc7f7d31b7b.txt
index ff5e466ab..11fc83373 100644
--- a/test/snapshots/analyze/case_test/test_0009_case_with_multiple_blocks_in_when_05f7d387314a95620a58ddc7f7d31b7b.txt
+++ b/test/snapshots/analyze/case_test/test_0009_case_with_multiple_blocks_in_when_05f7d387314a95620a58ddc7f7d31b7b.txt
@@ -1,3 +1,16 @@
+---
+source: "Analyze::CaseTest#test_0009_case with multiple blocks in when"
+input: |2-
+<% case status %>
+<% when :active %>
+ <%= content_tag(:div) do %>
+ Active
+ <% end %>
+ <%= content_tag(:span) do %>
+ Badge
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(10:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(9:9))
diff --git a/test/snapshots/analyze/case_test/test_0010_case_with_nested_blocks_in_when_6e70c1bf60788969969296d35c409a47.txt b/test/snapshots/analyze/case_test/test_0010_case_with_nested_blocks_in_when_6e70c1bf60788969969296d35c409a47.txt
index 857244cb8..662ecb13f 100644
--- a/test/snapshots/analyze/case_test/test_0010_case_with_nested_blocks_in_when_6e70c1bf60788969969296d35c409a47.txt
+++ b/test/snapshots/analyze/case_test/test_0010_case_with_nested_blocks_in_when_6e70c1bf60788969969296d35c409a47.txt
@@ -1,3 +1,15 @@
+---
+source: "Analyze::CaseTest#test_0010_case with nested blocks in when"
+input: |2-
+<% case level %>
+<% when 1 %>
+ <%= content_tag(:div) do %>
+ <%= content_tag(:p) do %>
+ Nested
+ <% end %>
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(9:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(8:9))
diff --git a/test/snapshots/analyze/case_test/test_0011_case_with_block_in_multiple_when_clauses_3f35d3ebf6ea6eaf8e7b9bc7f8393a0f.txt b/test/snapshots/analyze/case_test/test_0011_case_with_block_in_multiple_when_clauses_3f35d3ebf6ea6eaf8e7b9bc7f8393a0f.txt
index 818e209a5..11844c1fc 100644
--- a/test/snapshots/analyze/case_test/test_0011_case_with_block_in_multiple_when_clauses_3f35d3ebf6ea6eaf8e7b9bc7f8393a0f.txt
+++ b/test/snapshots/analyze/case_test/test_0011_case_with_block_in_multiple_when_clauses_3f35d3ebf6ea6eaf8e7b9bc7f8393a0f.txt
@@ -1,3 +1,17 @@
+---
+source: "Analyze::CaseTest#test_0011_case with block in multiple when clauses"
+input: |2-
+<% case type %>
+<% when :a %>
+ <%= form_for(obj) do |f| %>
+ Form A
+ <% end %>
+<% when :b %>
+ <%= form_for(obj) do |f| %>
+ Form B
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(11:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(10:9))
diff --git a/test/snapshots/analyze/case_test/test_0012_case_with_if_statement_inside_when_ccc0bd511203c41d9274ccc360e736c2.txt b/test/snapshots/analyze/case_test/test_0012_case_with_if_statement_inside_when_ccc0bd511203c41d9274ccc360e736c2.txt
index 5cef31f1d..ddd70eb0e 100644
--- a/test/snapshots/analyze/case_test/test_0012_case_with_if_statement_inside_when_ccc0bd511203c41d9274ccc360e736c2.txt
+++ b/test/snapshots/analyze/case_test/test_0012_case_with_if_statement_inside_when_ccc0bd511203c41d9274ccc360e736c2.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::CaseTest#test_0012_case with if statement inside when"
+input: |2-
+<% case status %>
+<% when :active %>
+ <% if admin? %>
+ Admin view
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/case_test/test_0013_case_with_yield_dc59b65969b8ef95076abc05c3907392.txt b/test/snapshots/analyze/case_test/test_0013_case_with_yield_dc59b65969b8ef95076abc05c3907392.txt
index 1a4e6654e..8f3cdcd8d 100644
--- a/test/snapshots/analyze/case_test/test_0013_case_with_yield_dc59b65969b8ef95076abc05c3907392.txt
+++ b/test/snapshots/analyze/case_test/test_0013_case_with_yield_dc59b65969b8ef95076abc05c3907392.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::CaseTest#test_0013_case with yield"
+input: |2-
+<% case yield(:a) %>
+<% when 'a' %>
+ aaa
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBCaseNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/escape_test/test_0001_escaped_erb_tag_94dbe0d71e8d4a3dbd06d39ffcad350c.txt b/test/snapshots/analyze/escape_test/test_0001_escaped_erb_tag_94dbe0d71e8d4a3dbd06d39ffcad350c.txt
index 9a8fe8968..7ae1a9343 100644
--- a/test/snapshots/analyze/escape_test/test_0001_escaped_erb_tag_94dbe0d71e8d4a3dbd06d39ffcad350c.txt
+++ b/test/snapshots/analyze/escape_test/test_0001_escaped_erb_tag_94dbe0d71e8d4a3dbd06d39ffcad350c.txt
@@ -1,3 +1,7 @@
+---
+source: "Analyze::EscapeTest#test_0001_escaped erb tag"
+input: "<%% 'Test' %%>"
+---
@ DocumentNode (location: (1:0)-(1:14))
└── children: (1 item)
└── @ ERBContentNode (location: (1:0)-(1:14))
diff --git a/test/snapshots/analyze/escape_test/test_0002_escaped_erb_output_tag_1ded89a552e264d13fefa7cc822a35c0.txt b/test/snapshots/analyze/escape_test/test_0002_escaped_erb_output_tag_1ded89a552e264d13fefa7cc822a35c0.txt
index c62cf6e00..8ded8c658 100644
--- a/test/snapshots/analyze/escape_test/test_0002_escaped_erb_output_tag_1ded89a552e264d13fefa7cc822a35c0.txt
+++ b/test/snapshots/analyze/escape_test/test_0002_escaped_erb_output_tag_1ded89a552e264d13fefa7cc822a35c0.txt
@@ -1,3 +1,7 @@
+---
+source: "Analyze::EscapeTest#test_0002_escaped erb output tag"
+input: "<%%= 'Test' %%>"
+---
@ DocumentNode (location: (1:0)-(1:15))
└── children: (1 item)
└── @ ERBContentNode (location: (1:0)-(1:15))
diff --git a/test/snapshots/analyze/for_test/test_0001_for_loop_7ec5a7ce89b03a36c5579d1a65c14274.txt b/test/snapshots/analyze/for_test/test_0001_for_loop_7ec5a7ce89b03a36c5579d1a65c14274.txt
index b55b3e88d..429afdd40 100644
--- a/test/snapshots/analyze/for_test/test_0001_for_loop_7ec5a7ce89b03a36c5579d1a65c14274.txt
+++ b/test/snapshots/analyze/for_test/test_0001_for_loop_7ec5a7ce89b03a36c5579d1a65c14274.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::ForTest#test_0001_for loop"
+input: |2-
+<% for i in 1..5 %>
+ <%= i %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBForNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/for_test/test_0002_for_loop_with_children_cad2b2f8aa5d54b817d3c82e82818659.txt b/test/snapshots/analyze/for_test/test_0002_for_loop_with_children_cad2b2f8aa5d54b817d3c82e82818659.txt
index 60f305f8c..b8f789ede 100644
--- a/test/snapshots/analyze/for_test/test_0002_for_loop_with_children_cad2b2f8aa5d54b817d3c82e82818659.txt
+++ b/test/snapshots/analyze/for_test/test_0002_for_loop_with_children_cad2b2f8aa5d54b817d3c82e82818659.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::ForTest#test_0002_for loop with children"
+input: |2-
+<% for fruit in ["apple", "banana", "orange"] %>
+ <%= fruit %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBForNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/for_test/test_0003_for_loop_wrapped_in_element_dc5c7df187a9c834fe5bb14c4805f146.txt b/test/snapshots/analyze/for_test/test_0003_for_loop_wrapped_in_element_dc5c7df187a9c834fe5bb14c4805f146.txt
index 9537815da..59b4536a4 100644
--- a/test/snapshots/analyze/for_test/test_0003_for_loop_wrapped_in_element_dc5c7df187a9c834fe5bb14c4805f146.txt
+++ b/test/snapshots/analyze/for_test/test_0003_for_loop_wrapped_in_element_dc5c7df187a9c834fe5bb14c4805f146.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::ForTest#test_0003_for loop wrapped in element"
+input: |2-
+
+ <% for i in 1..5 %>
+ <%= i %>
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(5:5))
diff --git a/test/snapshots/analyze/for_test/test_0004_nested_for_loops_491936055618c1eff4f83651ea92e8e9.txt b/test/snapshots/analyze/for_test/test_0004_nested_for_loops_491936055618c1eff4f83651ea92e8e9.txt
index 5b0f12527..a0f02eb93 100644
--- a/test/snapshots/analyze/for_test/test_0004_nested_for_loops_491936055618c1eff4f83651ea92e8e9.txt
+++ b/test/snapshots/analyze/for_test/test_0004_nested_for_loops_491936055618c1eff4f83651ea92e8e9.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::ForTest#test_0004_nested for loops"
+input: |2-
+<% for i in 1..5 %>
+ <% for j in 1..5 %>
+ <%= i %>, <%= j %>
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBForNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/if_test/test_0001_if_statement_6d66066a7761ec6dd8a7cc99cdc3489c.txt b/test/snapshots/analyze/if_test/test_0001_if_statement_6d66066a7761ec6dd8a7cc99cdc3489c.txt
index 072ac5af6..9b9c5fc10 100644
--- a/test/snapshots/analyze/if_test/test_0001_if_statement_6d66066a7761ec6dd8a7cc99cdc3489c.txt
+++ b/test/snapshots/analyze/if_test/test_0001_if_statement_6d66066a7761ec6dd8a7cc99cdc3489c.txt
@@ -1,3 +1,9 @@
+---
+source: "Analyze::IfTest#test_0001_if statement"
+input: |2-
+<% if true %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(3:0))
└── children: (2 items)
├── @ ERBIfNode (location: (1:0)-(2:9))
diff --git a/test/snapshots/analyze/if_test/test_0002_if_else_statement_5af49f43e6d63267cffc095e54e5ffcd.txt b/test/snapshots/analyze/if_test/test_0002_if_else_statement_5af49f43e6d63267cffc095e54e5ffcd.txt
index 6b88244d4..7ee1ec0e5 100644
--- a/test/snapshots/analyze/if_test/test_0002_if_else_statement_5af49f43e6d63267cffc095e54e5ffcd.txt
+++ b/test/snapshots/analyze/if_test/test_0002_if_else_statement_5af49f43e6d63267cffc095e54e5ffcd.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::IfTest#test_0002_if/else statement"
+input: |2-
+<% if true %>
+<% else %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBIfNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/if_test/test_0003_if_elsif_else_statement_189c9341230fd91e47ed767621771ae6.txt b/test/snapshots/analyze/if_test/test_0003_if_elsif_else_statement_189c9341230fd91e47ed767621771ae6.txt
index 21fd5ce2a..07a158dfc 100644
--- a/test/snapshots/analyze/if_test/test_0003_if_elsif_else_statement_189c9341230fd91e47ed767621771ae6.txt
+++ b/test/snapshots/analyze/if_test/test_0003_if_elsif_else_statement_189c9341230fd91e47ed767621771ae6.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::IfTest#test_0003_if/elsif/else statement"
+input: |2-
+<% if true %>
+<% elsif false %>
+<% else %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBIfNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/if_test/test_0004_if_elsif_elsif_else_statement_dda9e4f2ba454ab6d841390c684e222f.txt b/test/snapshots/analyze/if_test/test_0004_if_elsif_elsif_else_statement_dda9e4f2ba454ab6d841390c684e222f.txt
index 21e0f2989..dc0bb5b66 100644
--- a/test/snapshots/analyze/if_test/test_0004_if_elsif_elsif_else_statement_dda9e4f2ba454ab6d841390c684e222f.txt
+++ b/test/snapshots/analyze/if_test/test_0004_if_elsif_elsif_else_statement_dda9e4f2ba454ab6d841390c684e222f.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::IfTest#test_0004_if/elsif/elsif/else statement"
+input: |2-
+<% if true %>
+<% elsif false %>
+<% elsif nil %>
+<% else %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBIfNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/if_test/test_0005_if_elsif_else_statement_with_children_2f01997aa5b65191b261fb73a3268eb2.txt b/test/snapshots/analyze/if_test/test_0005_if_elsif_else_statement_with_children_2f01997aa5b65191b261fb73a3268eb2.txt
index ad025cc04..750ac3e93 100644
--- a/test/snapshots/analyze/if_test/test_0005_if_elsif_else_statement_with_children_2f01997aa5b65191b261fb73a3268eb2.txt
+++ b/test/snapshots/analyze/if_test/test_0005_if_elsif_else_statement_with_children_2f01997aa5b65191b261fb73a3268eb2.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::IfTest#test_0005_if/elsif/else statement with children"
+input: |2-
+<% if true %>
+ true
+<% elsif false %>
+ false
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBIfNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/if_test/test_0006_if_elsif_else_statement_wrapped_in_element_45a48a89838b00831a86d6bc5b8a29f6.txt b/test/snapshots/analyze/if_test/test_0006_if_elsif_else_statement_wrapped_in_element_45a48a89838b00831a86d6bc5b8a29f6.txt
index 86235cfd7..508248584 100644
--- a/test/snapshots/analyze/if_test/test_0006_if_elsif_else_statement_wrapped_in_element_45a48a89838b00831a86d6bc5b8a29f6.txt
+++ b/test/snapshots/analyze/if_test/test_0006_if_elsif_else_statement_wrapped_in_element_45a48a89838b00831a86d6bc5b8a29f6.txt
@@ -1,3 +1,16 @@
+---
+source: "Analyze::IfTest#test_0006_if/elsif/else statement wrapped in element"
+input: |2-
+
+ <% if true %>
+ true
+ <% elsif false %>
+ false
+ <% else %>
+ else
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(10:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(9:5))
diff --git a/test/snapshots/analyze/if_test/test_0007_nested_if_statements_d2803320721afe4e5e45cc05ece9915e.txt b/test/snapshots/analyze/if_test/test_0007_nested_if_statements_d2803320721afe4e5e45cc05ece9915e.txt
index b24609bc6..06eb5a4b7 100644
--- a/test/snapshots/analyze/if_test/test_0007_nested_if_statements_d2803320721afe4e5e45cc05ece9915e.txt
+++ b/test/snapshots/analyze/if_test/test_0007_nested_if_statements_d2803320721afe4e5e45cc05ece9915e.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::IfTest#test_0007_nested if statements"
+input: |2-
+<% if true %>
+ <% if false %>
+ <% if nil %>
+ true & false & nil
+ <% end %>
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBIfNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/if_test/test_0008_if_else_statement_in_opening_tag_value_cc409a1f9d234299bd306bda568b32b4.txt b/test/snapshots/analyze/if_test/test_0008_if_else_statement_in_opening_tag_value_cc409a1f9d234299bd306bda568b32b4.txt
index 37562b591..68284b7ce 100644
--- a/test/snapshots/analyze/if_test/test_0008_if_else_statement_in_opening_tag_value_cc409a1f9d234299bd306bda568b32b4.txt
+++ b/test/snapshots/analyze/if_test/test_0008_if_else_statement_in_opening_tag_value_cc409a1f9d234299bd306bda568b32b4.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::IfTest#test_0008_if/else statement in opening tag value"
+input: |2-
+
+ id="title"
+ <% end %>
+>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(5:6))
diff --git a/test/snapshots/analyze/if_test/test_0009_if_else_statement_in_attribute_value_8dd410c9c918399254e71570caeb17dc.txt b/test/snapshots/analyze/if_test/test_0009_if_else_statement_in_attribute_value_8dd410c9c918399254e71570caeb17dc.txt
index 3b4c09ddb..008eaecfb 100644
--- a/test/snapshots/analyze/if_test/test_0009_if_else_statement_in_attribute_value_8dd410c9c918399254e71570caeb17dc.txt
+++ b/test/snapshots/analyze/if_test/test_0009_if_else_statement_in_attribute_value_8dd410c9c918399254e71570caeb17dc.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::IfTest#test_0009_if/else statement in attribute value"
+input: |2-
+
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(1:61))
diff --git a/test/snapshots/analyze/if_test/test_0010_guard_clause_with_if_modifier_should_not_be_parsed_as_ERBIfNode_84c50d0087a29c69bf5125ce6ec79f86.txt b/test/snapshots/analyze/if_test/test_0010_guard_clause_with_if_modifier_should_not_be_parsed_as_ERBIfNode_84c50d0087a29c69bf5125ce6ec79f86.txt
index a2628958d..f9557bc65 100644
--- a/test/snapshots/analyze/if_test/test_0010_guard_clause_with_if_modifier_should_not_be_parsed_as_ERBIfNode_84c50d0087a29c69bf5125ce6ec79f86.txt
+++ b/test/snapshots/analyze/if_test/test_0010_guard_clause_with_if_modifier_should_not_be_parsed_as_ERBIfNode_84c50d0087a29c69bf5125ce6ec79f86.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::IfTest#test_0010_guard clause with if modifier should not be parsed as ERBIfNode"
+input: |2-
+<% [1,2].each do |value| %>
+ <% next if false %>
+
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/if_test/test_0011_guard_clause_with_return_if_modifier_6a92e7d29b0b8ff99771a96e90f4ac10.txt b/test/snapshots/analyze/if_test/test_0011_guard_clause_with_return_if_modifier_6a92e7d29b0b8ff99771a96e90f4ac10.txt
index fe0f987c7..669f87f9b 100644
--- a/test/snapshots/analyze/if_test/test_0011_guard_clause_with_return_if_modifier_6a92e7d29b0b8ff99771a96e90f4ac10.txt
+++ b/test/snapshots/analyze/if_test/test_0011_guard_clause_with_return_if_modifier_6a92e7d29b0b8ff99771a96e90f4ac10.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::IfTest#test_0011_guard clause with return if modifier"
+input: |2-
+<% def some_method %>
+ <% return if true %>
+ This won't render
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (8 items)
├── @ ERBContentNode (location: (1:0)-(1:21))
diff --git a/test/snapshots/analyze/if_test/test_0012_guard_clause_with_break_if_modifier_41f095a3d010c4b7e9a38aa708b9054d.txt b/test/snapshots/analyze/if_test/test_0012_guard_clause_with_break_if_modifier_41f095a3d010c4b7e9a38aa708b9054d.txt
index 02b208567..3b95e1274 100644
--- a/test/snapshots/analyze/if_test/test_0012_guard_clause_with_break_if_modifier_41f095a3d010c4b7e9a38aa708b9054d.txt
+++ b/test/snapshots/analyze/if_test/test_0012_guard_clause_with_break_if_modifier_41f095a3d010c4b7e9a38aa708b9054d.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::IfTest#test_0012_guard clause with break if modifier"
+input: |2-
+<% loop do %>
+ <% break if condition %>
+ Loop content
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/ternary_test/test_0001_ternary_operator_in_ERB_output_tag_487f1093637a362df78bafb89af97d09.txt b/test/snapshots/analyze/ternary_test/test_0001_ternary_operator_in_ERB_output_tag_487f1093637a362df78bafb89af97d09.txt
index 50682ce30..68332954e 100644
--- a/test/snapshots/analyze/ternary_test/test_0001_ternary_operator_in_ERB_output_tag_487f1093637a362df78bafb89af97d09.txt
+++ b/test/snapshots/analyze/ternary_test/test_0001_ternary_operator_in_ERB_output_tag_487f1093637a362df78bafb89af97d09.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::TernaryTest#test_0001_ternary operator in ERB output tag"
+input: |2-
+<%= condition ? true_value : false_value %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:43))
diff --git a/test/snapshots/analyze/ternary_test/test_0002_complex_ternary_operator_with_method_calls_c9fd4eebccb37e967b174ccf1bde7bf2.txt b/test/snapshots/analyze/ternary_test/test_0002_complex_ternary_operator_with_method_calls_c9fd4eebccb37e967b174ccf1bde7bf2.txt
index c4d9f19ae..2f7c6f342 100644
--- a/test/snapshots/analyze/ternary_test/test_0002_complex_ternary_operator_with_method_calls_c9fd4eebccb37e967b174ccf1bde7bf2.txt
+++ b/test/snapshots/analyze/ternary_test/test_0002_complex_ternary_operator_with_method_calls_c9fd4eebccb37e967b174ccf1bde7bf2.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::TernaryTest#test_0002_complex ternary operator with method calls"
+input: |2-
+<%= @user.new_record? ? new_user_path(name: @user.name) : edit_user_path(@user, name: @user.name) %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:100))
diff --git a/test/snapshots/analyze/ternary_test/test_0003_ternary_operator_in_form_with_3e5154d12d6259cc2ac2da74fc48e803.txt b/test/snapshots/analyze/ternary_test/test_0003_ternary_operator_in_form_with_3e5154d12d6259cc2ac2da74fc48e803.txt
index 3668939f8..0aca98143 100644
--- a/test/snapshots/analyze/ternary_test/test_0003_ternary_operator_in_form_with_3e5154d12d6259cc2ac2da74fc48e803.txt
+++ b/test/snapshots/analyze/ternary_test/test_0003_ternary_operator_in_form_with_3e5154d12d6259cc2ac2da74fc48e803.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::TernaryTest#test_0003_ternary operator in form_with"
+input: |2-
+<%= form_with model: @post, url: @post.new_record? ? posts_path : post_path(@post) do |f| %>
+ Content
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/ternary_test/test_0004_nested_ternary_operators_b02fe2f695043e3ef415f674581f8187.txt b/test/snapshots/analyze/ternary_test/test_0004_nested_ternary_operators_b02fe2f695043e3ef415f674581f8187.txt
index 8a52854fa..75643a2c5 100644
--- a/test/snapshots/analyze/ternary_test/test_0004_nested_ternary_operators_b02fe2f695043e3ef415f674581f8187.txt
+++ b/test/snapshots/analyze/ternary_test/test_0004_nested_ternary_operators_b02fe2f695043e3ef415f674581f8187.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::TernaryTest#test_0004_nested ternary operators"
+input: |2-
+<%= status == :active ? "Active" : (status == :pending ? "Pending" : "Inactive") %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:83))
diff --git a/test/snapshots/analyze/ternary_test/test_0005_ternary_operator_in_attribute_value_d0b1eb0c3aae3bb30cf7891afdac44b8.txt b/test/snapshots/analyze/ternary_test/test_0005_ternary_operator_in_attribute_value_d0b1eb0c3aae3bb30cf7891afdac44b8.txt
index 82d333d2b..ccbf0ad28 100644
--- a/test/snapshots/analyze/ternary_test/test_0005_ternary_operator_in_attribute_value_d0b1eb0c3aae3bb30cf7891afdac44b8.txt
+++ b/test/snapshots/analyze/ternary_test/test_0005_ternary_operator_in_attribute_value_d0b1eb0c3aae3bb30cf7891afdac44b8.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::TernaryTest#test_0005_ternary operator in attribute value"
+input: |2-
+Content
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(1:65))
diff --git a/test/snapshots/analyze/ternary_test/test_0006_multiple_ternary_operators_in_same_ERB_tag_7dd1d18fe401ed6c61c478be9ee5140f.txt b/test/snapshots/analyze/ternary_test/test_0006_multiple_ternary_operators_in_same_ERB_tag_7dd1d18fe401ed6c61c478be9ee5140f.txt
index 00325ad1a..8ef4caeef 100644
--- a/test/snapshots/analyze/ternary_test/test_0006_multiple_ternary_operators_in_same_ERB_tag_7dd1d18fe401ed6c61c478be9ee5140f.txt
+++ b/test/snapshots/analyze/ternary_test/test_0006_multiple_ternary_operators_in_same_ERB_tag_7dd1d18fe401ed6c61c478be9ee5140f.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::TernaryTest#test_0006_multiple ternary operators in same ERB tag"
+input: |2-
+<%= link_to (user.admin? ? "Admin" : "User"), (user.active? ? active_path : inactive_path) %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:93))
diff --git a/test/snapshots/analyze/ternary_test/test_0007_ternary_operator_with_blocks_a8c8a50604f8821739b2814b58b652f2.txt b/test/snapshots/analyze/ternary_test/test_0007_ternary_operator_with_blocks_a8c8a50604f8821739b2814b58b652f2.txt
index 6dc596787..423eac06b 100644
--- a/test/snapshots/analyze/ternary_test/test_0007_ternary_operator_with_blocks_a8c8a50604f8821739b2814b58b652f2.txt
+++ b/test/snapshots/analyze/ternary_test/test_0007_ternary_operator_with_blocks_a8c8a50604f8821739b2814b58b652f2.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::TernaryTest#test_0007_ternary operator with blocks"
+input: |2-
+<%= content_tag :div, class: (visible? ? "show" : "hide") do %>
+ Content
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/ternary_test/test_0008_form_with_helper_with_ternary_in_url_parameter_e554d08ac7e5da90cd046d79030c2a44.txt b/test/snapshots/analyze/ternary_test/test_0008_form_with_helper_with_ternary_in_url_parameter_e554d08ac7e5da90cd046d79030c2a44.txt
index aefe5bcdc..4c7c76623 100644
--- a/test/snapshots/analyze/ternary_test/test_0008_form_with_helper_with_ternary_in_url_parameter_e554d08ac7e5da90cd046d79030c2a44.txt
+++ b/test/snapshots/analyze/ternary_test/test_0008_form_with_helper_with_ternary_in_url_parameter_e554d08ac7e5da90cd046d79030c2a44.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::TernaryTest#test_0008_form_with helper with ternary in url parameter"
+input: |2-
+<%= form_with model: @user, url: @user.new_record? ? users_path : user_path(@user), method: @user.new_record? ? :post : :patch do |form| %>
+ <%= form.text_field :name %>
+ <%= form.submit %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/ternary_test/test_0009_content_tag_with_ternary_for_class_attribute_910f82cb9ee5855d1c51c08667ac90d5.txt b/test/snapshots/analyze/ternary_test/test_0009_content_tag_with_ternary_for_class_attribute_910f82cb9ee5855d1c51c08667ac90d5.txt
index 1ac082fec..8ec0036e2 100644
--- a/test/snapshots/analyze/ternary_test/test_0009_content_tag_with_ternary_for_class_attribute_910f82cb9ee5855d1c51c08667ac90d5.txt
+++ b/test/snapshots/analyze/ternary_test/test_0009_content_tag_with_ternary_for_class_attribute_910f82cb9ee5855d1c51c08667ac90d5.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::TernaryTest#test_0009_content_tag with ternary for class attribute"
+input: |2-
+<%= content_tag :div, "Hello World", class: current_user.admin? ? "admin-panel" : "user-panel" %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:97))
diff --git a/test/snapshots/analyze/ternary_test/test_0010_content_tag_with_ternary_for_data_attribute_6f00128b70c7d3176646995151ecfcaa.txt b/test/snapshots/analyze/ternary_test/test_0010_content_tag_with_ternary_for_data_attribute_6f00128b70c7d3176646995151ecfcaa.txt
index 51e2c5dc7..6f4a34c40 100644
--- a/test/snapshots/analyze/ternary_test/test_0010_content_tag_with_ternary_for_data_attribute_6f00128b70c7d3176646995151ecfcaa.txt
+++ b/test/snapshots/analyze/ternary_test/test_0010_content_tag_with_ternary_for_data_attribute_6f00128b70c7d3176646995151ecfcaa.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::TernaryTest#test_0010_content_tag with ternary for data attribute"
+input: |2-
+<%= content_tag :button, "Click me",
+ data: {
+ action: @item.published? ? "unpublish" : "publish",
+ confirm: @item.published? ? "Are you sure you want to unpublish?" : "Are you sure you want to publish?"
+ } %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(5:8))
diff --git a/test/snapshots/analyze/ternary_test/test_0011_form_with_with_complex_ternary_in_multiple_attributes_0db72f423bc1543d78016121e43409d3.txt b/test/snapshots/analyze/ternary_test/test_0011_form_with_with_complex_ternary_in_multiple_attributes_0db72f423bc1543d78016121e43409d3.txt
index b1784587c..f2e10622b 100644
--- a/test/snapshots/analyze/ternary_test/test_0011_form_with_with_complex_ternary_in_multiple_attributes_0db72f423bc1543d78016121e43409d3.txt
+++ b/test/snapshots/analyze/ternary_test/test_0011_form_with_with_complex_ternary_in_multiple_attributes_0db72f423bc1543d78016121e43409d3.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::TernaryTest#test_0011_form_with with complex ternary in multiple attributes"
+input: |2-
+<%= form_with model: @article,
+ url: @article.persisted? ? article_path(@article) : articles_path,
+ html: { class: @article.draft? ? "draft-form" : "published-form" },
+ local: @article.draft? ? true : false do |f| %>
+ <%= f.text_field :title %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/ternary_test/test_0012_inline_if_modifier_in_ERB_output_tag_b4d740369619f1d7bde41172ac6933e6.txt b/test/snapshots/analyze/ternary_test/test_0012_inline_if_modifier_in_ERB_output_tag_b4d740369619f1d7bde41172ac6933e6.txt
index 0c5c39fa2..4a73ac63c 100644
--- a/test/snapshots/analyze/ternary_test/test_0012_inline_if_modifier_in_ERB_output_tag_b4d740369619f1d7bde41172ac6933e6.txt
+++ b/test/snapshots/analyze/ternary_test/test_0012_inline_if_modifier_in_ERB_output_tag_b4d740369619f1d7bde41172ac6933e6.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::TernaryTest#test_0012_inline if modifier in ERB output tag"
+input: |2-
+<%= render 'partial' if user_signed_in? %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:42))
diff --git a/test/snapshots/analyze/ternary_test/test_0013_inline_unless_modifier_in_ERB_output_tag_982863841843053cc3728f62e00fa523.txt b/test/snapshots/analyze/ternary_test/test_0013_inline_unless_modifier_in_ERB_output_tag_982863841843053cc3728f62e00fa523.txt
index b55122e0e..21bd2e1f7 100644
--- a/test/snapshots/analyze/ternary_test/test_0013_inline_unless_modifier_in_ERB_output_tag_982863841843053cc3728f62e00fa523.txt
+++ b/test/snapshots/analyze/ternary_test/test_0013_inline_unless_modifier_in_ERB_output_tag_982863841843053cc3728f62e00fa523.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::TernaryTest#test_0013_inline unless modifier in ERB output tag"
+input: |2-
+<%= link_to "Home", root_path unless current_page?(root_path) %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBContentNode (location: (1:0)-(1:64))
diff --git a/test/snapshots/analyze/unless_test/test_0001_unless_statement_b9069f5ae184133162ab0372cfb63c39.txt b/test/snapshots/analyze/unless_test/test_0001_unless_statement_b9069f5ae184133162ab0372cfb63c39.txt
index 6f7395207..26013464d 100644
--- a/test/snapshots/analyze/unless_test/test_0001_unless_statement_b9069f5ae184133162ab0372cfb63c39.txt
+++ b/test/snapshots/analyze/unless_test/test_0001_unless_statement_b9069f5ae184133162ab0372cfb63c39.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::UnlessTest#test_0001_unless statement"
+input: |2-
+<% unless true %>
+ true
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBUnlessNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/unless_test/test_0002_unless_statement_wrapped_in_element_da5f138eef1f987f71ce62c984ec4b98.txt b/test/snapshots/analyze/unless_test/test_0002_unless_statement_wrapped_in_element_da5f138eef1f987f71ce62c984ec4b98.txt
index 899c7bdf2..4bb01e5c8 100644
--- a/test/snapshots/analyze/unless_test/test_0002_unless_statement_wrapped_in_element_da5f138eef1f987f71ce62c984ec4b98.txt
+++ b/test/snapshots/analyze/unless_test/test_0002_unless_statement_wrapped_in_element_da5f138eef1f987f71ce62c984ec4b98.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::UnlessTest#test_0002_unless statement wrapped in element"
+input: |2-
+
+ <% unless true %>
+ true
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(5:5))
diff --git a/test/snapshots/analyze/unless_test/test_0003_unless_statement_with_multiple_children_3e9be163722a3cc21d0ee1c07ebbbfd4.txt b/test/snapshots/analyze/unless_test/test_0003_unless_statement_with_multiple_children_3e9be163722a3cc21d0ee1c07ebbbfd4.txt
index 57e9dfa48..00a724fad 100644
--- a/test/snapshots/analyze/unless_test/test_0003_unless_statement_with_multiple_children_3e9be163722a3cc21d0ee1c07ebbbfd4.txt
+++ b/test/snapshots/analyze/unless_test/test_0003_unless_statement_with_multiple_children_3e9be163722a3cc21d0ee1c07ebbbfd4.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::UnlessTest#test_0003_unless statement with multiple children"
+input: |2-
+<% unless true %>
+ true
+ true
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBUnlessNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/unless_test/test_0004_unless_statement_with_multiple_children_wrapped_in_element_68d73e451f7629a849c27b9d53bf6a77.txt b/test/snapshots/analyze/unless_test/test_0004_unless_statement_with_multiple_children_wrapped_in_element_68d73e451f7629a849c27b9d53bf6a77.txt
index ab2a37e7d..8d01f865d 100644
--- a/test/snapshots/analyze/unless_test/test_0004_unless_statement_with_multiple_children_wrapped_in_element_68d73e451f7629a849c27b9d53bf6a77.txt
+++ b/test/snapshots/analyze/unless_test/test_0004_unless_statement_with_multiple_children_wrapped_in_element_68d73e451f7629a849c27b9d53bf6a77.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::UnlessTest#test_0004_unless statement with multiple children wrapped in element"
+input: |2-
+
+ <% unless true %>
+ true
+ true
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(6:5))
diff --git a/test/snapshots/analyze/unless_test/test_0005_unless_statement_with_else_70949ac6a2833b2b972508ab1ca3f701.txt b/test/snapshots/analyze/unless_test/test_0005_unless_statement_with_else_70949ac6a2833b2b972508ab1ca3f701.txt
index c12c6aa9c..1e0e61ec6 100644
--- a/test/snapshots/analyze/unless_test/test_0005_unless_statement_with_else_70949ac6a2833b2b972508ab1ca3f701.txt
+++ b/test/snapshots/analyze/unless_test/test_0005_unless_statement_with_else_70949ac6a2833b2b972508ab1ca3f701.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::UnlessTest#test_0005_unless statement with else"
+input: |2-
+<% unless true %>
+ true
+<% else %>
+ else
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBUnlessNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/unless_test/test_0006_nested_unless_statements_f80d305e3bf8d4792b9110c87196318d.txt b/test/snapshots/analyze/unless_test/test_0006_nested_unless_statements_f80d305e3bf8d4792b9110c87196318d.txt
index 97f255f4f..882d6aeaf 100644
--- a/test/snapshots/analyze/unless_test/test_0006_nested_unless_statements_f80d305e3bf8d4792b9110c87196318d.txt
+++ b/test/snapshots/analyze/unless_test/test_0006_nested_unless_statements_f80d305e3bf8d4792b9110c87196318d.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::UnlessTest#test_0006_nested unless statements"
+input: |2-
+<% unless true %>
+ true
+
+ <% unless false %>
+ false
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBUnlessNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/unless_test/test_0007_guard_clause_with_unless_modifier_should_not_be_parsed_as_ERBUnlessNode_647968bffc9de35b805b872472b322b7.txt b/test/snapshots/analyze/unless_test/test_0007_guard_clause_with_unless_modifier_should_not_be_parsed_as_ERBUnlessNode_647968bffc9de35b805b872472b322b7.txt
index 2d9b82db4..dcb1bc89c 100644
--- a/test/snapshots/analyze/unless_test/test_0007_guard_clause_with_unless_modifier_should_not_be_parsed_as_ERBUnlessNode_647968bffc9de35b805b872472b322b7.txt
+++ b/test/snapshots/analyze/unless_test/test_0007_guard_clause_with_unless_modifier_should_not_be_parsed_as_ERBUnlessNode_647968bffc9de35b805b872472b322b7.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::UnlessTest#test_0007_guard clause with unless modifier should not be parsed as ERBUnlessNode"
+input: |2-
+<% items.each do |item| %>
+ <% next unless item.visible? %>
+ <%= item.name %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/unless_test/test_0008_guard_clause_with_return_unless_modifier_650bfc3134fa92038c335f96f9047860.txt b/test/snapshots/analyze/unless_test/test_0008_guard_clause_with_return_unless_modifier_650bfc3134fa92038c335f96f9047860.txt
index bc0fd0e21..2788b4d02 100644
--- a/test/snapshots/analyze/unless_test/test_0008_guard_clause_with_return_unless_modifier_650bfc3134fa92038c335f96f9047860.txt
+++ b/test/snapshots/analyze/unless_test/test_0008_guard_clause_with_return_unless_modifier_650bfc3134fa92038c335f96f9047860.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::UnlessTest#test_0008_guard clause with return unless modifier"
+input: |2-
+<% def some_method %>
+ <% return unless condition %>
+ This will render
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (8 items)
├── @ ERBContentNode (location: (1:0)-(1:21))
diff --git a/test/snapshots/analyze/unless_test/test_0009_guard_clause_with_break_unless_modifier_5ae9786a5b6893828c737287cffd216f.txt b/test/snapshots/analyze/unless_test/test_0009_guard_clause_with_break_unless_modifier_5ae9786a5b6893828c737287cffd216f.txt
index 844e63c5a..e0ace911d 100644
--- a/test/snapshots/analyze/unless_test/test_0009_guard_clause_with_break_unless_modifier_5ae9786a5b6893828c737287cffd216f.txt
+++ b/test/snapshots/analyze/unless_test/test_0009_guard_clause_with_break_unless_modifier_5ae9786a5b6893828c737287cffd216f.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::UnlessTest#test_0009_guard clause with break unless modifier"
+input: |2-
+<% loop do %>
+ <% break unless continue? %>
+ Loop content
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/unless_test/test_0010_multiple_unless_guard_clauses_80edd1ae63fb2cd18f33418d1ef308c1.txt b/test/snapshots/analyze/unless_test/test_0010_multiple_unless_guard_clauses_80edd1ae63fb2cd18f33418d1ef308c1.txt
index 5819fd67d..8f13e9d5b 100644
--- a/test/snapshots/analyze/unless_test/test_0010_multiple_unless_guard_clauses_80edd1ae63fb2cd18f33418d1ef308c1.txt
+++ b/test/snapshots/analyze/unless_test/test_0010_multiple_unless_guard_clauses_80edd1ae63fb2cd18f33418d1ef308c1.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::UnlessTest#test_0010_multiple unless guard clauses"
+input: |2-
+<% items.each do |item| %>
+ <% next unless item %>
+ <% next unless item.active? %>
+ <% next unless item.published? %>
+ <%= item.title %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(6:9))
diff --git a/test/snapshots/analyze/unless_test/test_0011_distinguishes_between_block_unless_and_modifier_unless_4ca85acaceb3fb39b75797c6a07e7437.txt b/test/snapshots/analyze/unless_test/test_0011_distinguishes_between_block_unless_and_modifier_unless_4ca85acaceb3fb39b75797c6a07e7437.txt
index 6b99a9218..4d5ded5d5 100644
--- a/test/snapshots/analyze/unless_test/test_0011_distinguishes_between_block_unless_and_modifier_unless_4ca85acaceb3fb39b75797c6a07e7437.txt
+++ b/test/snapshots/analyze/unless_test/test_0011_distinguishes_between_block_unless_and_modifier_unless_4ca85acaceb3fb39b75797c6a07e7437.txt
@@ -1,3 +1,15 @@
+---
+source: "Analyze::UnlessTest#test_0011_distinguishes between block unless and modifier unless"
+input: |2-
+<% items.each do |item| %>
+ <% next unless item.visible? %>
+ <% unless item.special? %>
+ <%= item.name %>
+ <% else %>
+ <%= item.name %>
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(9:0))
└── children: (2 items)
├── @ ERBBlockNode (location: (1:0)-(8:9))
diff --git a/test/snapshots/analyze/until_test/test_0001_until_statement_cebc8340ea1e761f6ce3885d88328dc1.txt b/test/snapshots/analyze/until_test/test_0001_until_statement_cebc8340ea1e761f6ce3885d88328dc1.txt
index 040960dcf..b431d6eb5 100644
--- a/test/snapshots/analyze/until_test/test_0001_until_statement_cebc8340ea1e761f6ce3885d88328dc1.txt
+++ b/test/snapshots/analyze/until_test/test_0001_until_statement_cebc8340ea1e761f6ce3885d88328dc1.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::UntilTest#test_0001_until statement"
+input: |2-
+<% until true %>
+ true
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBUntilNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/until_test/test_0002_until_statement_wrapped_in_element_1f3ffcb5fe8fc6596865e33d2ab7252e.txt b/test/snapshots/analyze/until_test/test_0002_until_statement_wrapped_in_element_1f3ffcb5fe8fc6596865e33d2ab7252e.txt
index 1423185e6..9db17084c 100644
--- a/test/snapshots/analyze/until_test/test_0002_until_statement_wrapped_in_element_1f3ffcb5fe8fc6596865e33d2ab7252e.txt
+++ b/test/snapshots/analyze/until_test/test_0002_until_statement_wrapped_in_element_1f3ffcb5fe8fc6596865e33d2ab7252e.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::UntilTest#test_0002_until statement wrapped in element"
+input: |2-
+
+ <% until true %>
+ true
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(5:5))
diff --git a/test/snapshots/analyze/until_test/test_0003_until_statement_with_multiple_children_329404c0b9dc64b1825b2b64f49640f7.txt b/test/snapshots/analyze/until_test/test_0003_until_statement_with_multiple_children_329404c0b9dc64b1825b2b64f49640f7.txt
index 2cfdca624..3d32968cd 100644
--- a/test/snapshots/analyze/until_test/test_0003_until_statement_with_multiple_children_329404c0b9dc64b1825b2b64f49640f7.txt
+++ b/test/snapshots/analyze/until_test/test_0003_until_statement_with_multiple_children_329404c0b9dc64b1825b2b64f49640f7.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::UntilTest#test_0003_until statement with multiple children"
+input: |2-
+<% until true %>
+ true
+ true
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBUntilNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/until_test/test_0004_until_statement_with_multiple_children_wrapped_in_element_b1ef79555d9533d568edd30004f8f031.txt b/test/snapshots/analyze/until_test/test_0004_until_statement_with_multiple_children_wrapped_in_element_b1ef79555d9533d568edd30004f8f031.txt
index c67d54b7c..b509f8349 100644
--- a/test/snapshots/analyze/until_test/test_0004_until_statement_with_multiple_children_wrapped_in_element_b1ef79555d9533d568edd30004f8f031.txt
+++ b/test/snapshots/analyze/until_test/test_0004_until_statement_with_multiple_children_wrapped_in_element_b1ef79555d9533d568edd30004f8f031.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::UntilTest#test_0004_until statement with multiple children wrapped in element"
+input: |2-
+
+ <% until true %>
+ true
+ true
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(6:5))
diff --git a/test/snapshots/analyze/until_test/test_0005_nested_until_statements_a09465aa6b8033b408b97fb325d7ab66.txt b/test/snapshots/analyze/until_test/test_0005_nested_until_statements_a09465aa6b8033b408b97fb325d7ab66.txt
index cab78a206..5253ed772 100644
--- a/test/snapshots/analyze/until_test/test_0005_nested_until_statements_a09465aa6b8033b408b97fb325d7ab66.txt
+++ b/test/snapshots/analyze/until_test/test_0005_nested_until_statements_a09465aa6b8033b408b97fb325d7ab66.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::UntilTest#test_0005_nested until statements"
+input: |2-
+<% until true %>
+ true
+
+ <% until false %>
+ false
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBUntilNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/until_test/test_0006_until_statement_with_break_a05643dc6a16774c25549930740f8c33.txt b/test/snapshots/analyze/until_test/test_0006_until_statement_with_break_a05643dc6a16774c25549930740f8c33.txt
index 288ef98ee..3b7afcde0 100644
--- a/test/snapshots/analyze/until_test/test_0006_until_statement_with_break_a05643dc6a16774c25549930740f8c33.txt
+++ b/test/snapshots/analyze/until_test/test_0006_until_statement_with_break_a05643dc6a16774c25549930740f8c33.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::UntilTest#test_0006_until statement with break"
+input: |2-
+<% until true %>
+ true
+
+ <% break %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBUntilNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/until_test/test_0007_until_statement_with_next_360523760a88c79cd2e2a120fe723de7.txt b/test/snapshots/analyze/until_test/test_0007_until_statement_with_next_360523760a88c79cd2e2a120fe723de7.txt
index b2a6f6120..adb716d1b 100644
--- a/test/snapshots/analyze/until_test/test_0007_until_statement_with_next_360523760a88c79cd2e2a120fe723de7.txt
+++ b/test/snapshots/analyze/until_test/test_0007_until_statement_with_next_360523760a88c79cd2e2a120fe723de7.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::UntilTest#test_0007_until statement with next"
+input: |2-
+<% until true %>
+ true
+
+ <% next %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBUntilNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/while_test/test_0001_while_statement_80ec9198a269a436b3bc6b3751352e04.txt b/test/snapshots/analyze/while_test/test_0001_while_statement_80ec9198a269a436b3bc6b3751352e04.txt
index 921e5fa19..a9c708181 100644
--- a/test/snapshots/analyze/while_test/test_0001_while_statement_80ec9198a269a436b3bc6b3751352e04.txt
+++ b/test/snapshots/analyze/while_test/test_0001_while_statement_80ec9198a269a436b3bc6b3751352e04.txt
@@ -1,3 +1,10 @@
+---
+source: "Analyze::WhileTest#test_0001_while statement"
+input: |2-
+<% while true %>
+ true
+<% end %>
+---
@ DocumentNode (location: (1:0)-(4:0))
└── children: (2 items)
├── @ ERBWhileNode (location: (1:0)-(3:9))
diff --git a/test/snapshots/analyze/while_test/test_0002_while_statement_wrapped_in_element_0f8b0693370dfebe34b6705db39fd7ea.txt b/test/snapshots/analyze/while_test/test_0002_while_statement_wrapped_in_element_0f8b0693370dfebe34b6705db39fd7ea.txt
index 65fcd77f4..1f94f16fe 100644
--- a/test/snapshots/analyze/while_test/test_0002_while_statement_wrapped_in_element_0f8b0693370dfebe34b6705db39fd7ea.txt
+++ b/test/snapshots/analyze/while_test/test_0002_while_statement_wrapped_in_element_0f8b0693370dfebe34b6705db39fd7ea.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::WhileTest#test_0002_while statement wrapped in element"
+input: |2-
+
+ <% while true %>
+ true
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(5:5))
diff --git a/test/snapshots/analyze/while_test/test_0003_while_statement_with_multiple_children_655e4c05f774ea93289049d3910a144f.txt b/test/snapshots/analyze/while_test/test_0003_while_statement_with_multiple_children_655e4c05f774ea93289049d3910a144f.txt
index 5153785b8..fb5272278 100644
--- a/test/snapshots/analyze/while_test/test_0003_while_statement_with_multiple_children_655e4c05f774ea93289049d3910a144f.txt
+++ b/test/snapshots/analyze/while_test/test_0003_while_statement_with_multiple_children_655e4c05f774ea93289049d3910a144f.txt
@@ -1,3 +1,11 @@
+---
+source: "Analyze::WhileTest#test_0003_while statement with multiple children"
+input: |2-
+<% while true %>
+ true
+ true
+<% end %>
+---
@ DocumentNode (location: (1:0)-(5:0))
└── children: (2 items)
├── @ ERBWhileNode (location: (1:0)-(4:9))
diff --git a/test/snapshots/analyze/while_test/test_0004_while_statement_with_multiple_children_wrapped_in_element_fc5e9e2adcc5aff28ce2d7b0fb074464.txt b/test/snapshots/analyze/while_test/test_0004_while_statement_with_multiple_children_wrapped_in_element_fc5e9e2adcc5aff28ce2d7b0fb074464.txt
index 9157c20fe..4f9fd59f4 100644
--- a/test/snapshots/analyze/while_test/test_0004_while_statement_with_multiple_children_wrapped_in_element_fc5e9e2adcc5aff28ce2d7b0fb074464.txt
+++ b/test/snapshots/analyze/while_test/test_0004_while_statement_with_multiple_children_wrapped_in_element_fc5e9e2adcc5aff28ce2d7b0fb074464.txt
@@ -1,3 +1,13 @@
+---
+source: "Analyze::WhileTest#test_0004_while statement with multiple children wrapped in element"
+input: |2-
+
+ <% while true %>
+ true
+ true
+ <% end %>
+
+---
@ DocumentNode (location: (1:0)-(7:0))
└── children: (2 items)
├── @ HTMLElementNode (location: (1:0)-(6:5))
diff --git a/test/snapshots/analyze/while_test/test_0005_while_statement_with_multiple_children_and_multiple_while_adcbb3ba9e1af65fc56a9e4fd9ed0570.txt b/test/snapshots/analyze/while_test/test_0005_while_statement_with_multiple_children_and_multiple_while_adcbb3ba9e1af65fc56a9e4fd9ed0570.txt
index 1dcb01dff..135b5324d 100644
--- a/test/snapshots/analyze/while_test/test_0005_while_statement_with_multiple_children_and_multiple_while_adcbb3ba9e1af65fc56a9e4fd9ed0570.txt
+++ b/test/snapshots/analyze/while_test/test_0005_while_statement_with_multiple_children_and_multiple_while_adcbb3ba9e1af65fc56a9e4fd9ed0570.txt
@@ -1,3 +1,15 @@
+---
+source: "Analyze::WhileTest#test_0005_while statement with multiple children and multiple while"
+input: |2-
+<% while true %>
+ true
+ true
+
+ <% while false %>
+ false
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(9:0))
└── children: (2 items)
├── @ ERBWhileNode (location: (1:0)-(8:9))
diff --git a/test/snapshots/analyze/while_test/test_0006_while_statement_with_break_7fe1a7737e0d01a3e8f78341ce5a31ea.txt b/test/snapshots/analyze/while_test/test_0006_while_statement_with_break_7fe1a7737e0d01a3e8f78341ce5a31ea.txt
index 63ed0db2e..ed30b000c 100644
--- a/test/snapshots/analyze/while_test/test_0006_while_statement_with_break_7fe1a7737e0d01a3e8f78341ce5a31ea.txt
+++ b/test/snapshots/analyze/while_test/test_0006_while_statement_with_break_7fe1a7737e0d01a3e8f78341ce5a31ea.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::WhileTest#test_0006_while statement with break"
+input: |2-
+<% while true %>
+ true
+
+ <% break %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBWhileNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/while_test/test_0007_while_statement_with_next_c60dcf0135ff764cb78cf5ebab562962.txt b/test/snapshots/analyze/while_test/test_0007_while_statement_with_next_c60dcf0135ff764cb78cf5ebab562962.txt
index f8f60e734..49d99778e 100644
--- a/test/snapshots/analyze/while_test/test_0007_while_statement_with_next_c60dcf0135ff764cb78cf5ebab562962.txt
+++ b/test/snapshots/analyze/while_test/test_0007_while_statement_with_next_c60dcf0135ff764cb78cf5ebab562962.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::WhileTest#test_0007_while statement with next"
+input: |2-
+<% while true %>
+ true
+
+ <% next %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBWhileNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/while_test/test_0008_while_statement_with_redo_48925bae257116b8279a76ad623f9657.txt b/test/snapshots/analyze/while_test/test_0008_while_statement_with_redo_48925bae257116b8279a76ad623f9657.txt
index 7a626afa6..7fb84aefe 100644
--- a/test/snapshots/analyze/while_test/test_0008_while_statement_with_redo_48925bae257116b8279a76ad623f9657.txt
+++ b/test/snapshots/analyze/while_test/test_0008_while_statement_with_redo_48925bae257116b8279a76ad623f9657.txt
@@ -1,3 +1,12 @@
+---
+source: "Analyze::WhileTest#test_0008_while statement with redo"
+input: |2-
+<% while true %>
+ true
+
+ <% redo %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(6:0))
└── children: (2 items)
├── @ ERBWhileNode (location: (1:0)-(5:9))
diff --git a/test/snapshots/analyze/while_test/test_0009_nested_while_statements_1b9c93b2610e46293a5d14116c6b2f96.txt b/test/snapshots/analyze/while_test/test_0009_nested_while_statements_1b9c93b2610e46293a5d14116c6b2f96.txt
index 7f04af537..6b44749a5 100644
--- a/test/snapshots/analyze/while_test/test_0009_nested_while_statements_1b9c93b2610e46293a5d14116c6b2f96.txt
+++ b/test/snapshots/analyze/while_test/test_0009_nested_while_statements_1b9c93b2610e46293a5d14116c6b2f96.txt
@@ -1,3 +1,14 @@
+---
+source: "Analyze::WhileTest#test_0009_nested while statements"
+input: |2-
+<% while true %>
+ true
+
+ <% while false %>
+ false
+ <% end %>
+<% end %>
+---
@ DocumentNode (location: (1:0)-(8:0))
└── children: (2 items)
├── @ ERBWhileNode (location: (1:0)-(7:9))
diff --git a/test/snapshots/analyze/yield_test/test_0001_yield_811e738151285db6da8e3a493b8d6e2b.txt b/test/snapshots/analyze/yield_test/test_0001_yield_811e738151285db6da8e3a493b8d6e2b.txt
index 05b09860e..2441851c9 100644
--- a/test/snapshots/analyze/yield_test/test_0001_yield_811e738151285db6da8e3a493b8d6e2b.txt
+++ b/test/snapshots/analyze/yield_test/test_0001_yield_811e738151285db6da8e3a493b8d6e2b.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::YieldTest#test_0001_yield"
+input: |2-
+<%= yield %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBYieldNode (location: (1:0)-(1:12))
diff --git a/test/snapshots/analyze/yield_test/test_0002_yield_with_symbol_0f3dddc66e3930ac6552f5a273092594.txt b/test/snapshots/analyze/yield_test/test_0002_yield_with_symbol_0f3dddc66e3930ac6552f5a273092594.txt
index c93392d67..fa802e69d 100644
--- a/test/snapshots/analyze/yield_test/test_0002_yield_with_symbol_0f3dddc66e3930ac6552f5a273092594.txt
+++ b/test/snapshots/analyze/yield_test/test_0002_yield_with_symbol_0f3dddc66e3930ac6552f5a273092594.txt
@@ -1,3 +1,8 @@
+---
+source: "Analyze::YieldTest#test_0002_yield with symbol"
+input: |2-
+<%= yield :symbol %>
+---
@ DocumentNode (location: (1:0)-(2:0))
└── children: (2 items)
├── @ ERBYieldNode (location: (1:0)-(1:20))
diff --git a/test/snapshots/engine/block_comments_test/test_0001_ruby_block_comments_with_=begin_and_=end_multiline_ff404c4e708f59f532b4042441e458ad.txt b/test/snapshots/engine/block_comments_test/test_0001_ruby_block_comments_with_=begin_and_=end_multiline_ff404c4e708f59f532b4042441e458ad.txt
index b86d395f2..65f8e4403 100644
--- a/test/snapshots/engine/block_comments_test/test_0001_ruby_block_comments_with_=begin_and_=end_multiline_ff404c4e708f59f532b4042441e458ad.txt
+++ b/test/snapshots/engine/block_comments_test/test_0001_ruby_block_comments_with_=begin_and_=end_multiline_ff404c4e708f59f532b4042441e458ad.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::BlockCommentsTest#test_0001_ruby block comments with =begin and =end multiline"
+input: "{source: \"<%\\n=begin %>\\n This, while unusual, is a legal form of commenting.\\n<%\\n=end %>\\nHey there
\\n\", options: {}}"
+---
_buf = ::String.new;
=begin
diff --git a/test/snapshots/engine/block_comments_test/test_0002_ruby_block_comments_inside_erb_tags_95bcfa3f3e28634bf923f18df0cd38a1.txt b/test/snapshots/engine/block_comments_test/test_0002_ruby_block_comments_inside_erb_tags_95bcfa3f3e28634bf923f18df0cd38a1.txt
index 467a7f23a..80aa8e7b7 100644
--- a/test/snapshots/engine/block_comments_test/test_0002_ruby_block_comments_inside_erb_tags_95bcfa3f3e28634bf923f18df0cd38a1.txt
+++ b/test/snapshots/engine/block_comments_test/test_0002_ruby_block_comments_inside_erb_tags_95bcfa3f3e28634bf923f18df0cd38a1.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::BlockCommentsTest#test_0002_ruby block comments inside erb tags"
+input: "{source: \"<%\\n=begin\\nThis is a comment\\n=end\\n%>\\nContent
\\n\", options: {}}"
+---
_buf = ::String.new;
=begin
diff --git a/test/snapshots/engine/block_comments_test/test_0003_ruby_block_comments_with_code_before_and_after_0ee0ba8a9a25359175b884cf66f37b2c.txt b/test/snapshots/engine/block_comments_test/test_0003_ruby_block_comments_with_code_before_and_after_0ee0ba8a9a25359175b884cf66f37b2c.txt
index 545dc4e42..e13a88cc2 100644
--- a/test/snapshots/engine/block_comments_test/test_0003_ruby_block_comments_with_code_before_and_after_0ee0ba8a9a25359175b884cf66f37b2c.txt
+++ b/test/snapshots/engine/block_comments_test/test_0003_ruby_block_comments_with_code_before_and_after_0ee0ba8a9a25359175b884cf66f37b2c.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::BlockCommentsTest#test_0003_ruby block comments with code before and after"
+input: "{source: \"<% x = 1 %>\\n<%\\n=begin\\nMulti-line comment\\nspanning multiple lines\\n=end\\n%>\\n<% y = 2 %>\\n<%= x + y %>
\\n\", options: {}}"
+---
_buf = ::String.new;
x = 1; _buf << '
'.freeze;
diff --git a/test/snapshots/engine/block_comments_test/test_0004_evaluation_ruby_block_comments_with_=begin_and_=end_mutliline_6bf3affa07b559b73f6428e0dbd270d2.txt b/test/snapshots/engine/block_comments_test/test_0004_evaluation_ruby_block_comments_with_=begin_and_=end_mutliline_6bf3affa07b559b73f6428e0dbd270d2.txt
index a6a4497b5..e9769ee8a 100644
--- a/test/snapshots/engine/block_comments_test/test_0004_evaluation_ruby_block_comments_with_=begin_and_=end_mutliline_6bf3affa07b559b73f6428e0dbd270d2.txt
+++ b/test/snapshots/engine/block_comments_test/test_0004_evaluation_ruby_block_comments_with_=begin_and_=end_mutliline_6bf3affa07b559b73f6428e0dbd270d2.txt
@@ -1,2 +1,6 @@
+---
+source: "Engine::BlockCommentsTest#test_0004_evaluation: ruby block comments with =begin and =end mutliline"
+input: "{source: \"<%\\n=begin %>\\n This, while unusual, is a legal form of commenting.\\n<%\\n=end %>\\nHey there
\\n\", locals: {}, options: {}}"
+---
Hey there
diff --git a/test/snapshots/engine/block_comments_test/test_0005_evaluation_ruby_block_comments_inside_erb_tags_8a842d797202d0b31c9832cd43a22686.txt b/test/snapshots/engine/block_comments_test/test_0005_evaluation_ruby_block_comments_inside_erb_tags_8a842d797202d0b31c9832cd43a22686.txt
index 1efa30582..58c8165c7 100644
--- a/test/snapshots/engine/block_comments_test/test_0005_evaluation_ruby_block_comments_inside_erb_tags_8a842d797202d0b31c9832cd43a22686.txt
+++ b/test/snapshots/engine/block_comments_test/test_0005_evaluation_ruby_block_comments_inside_erb_tags_8a842d797202d0b31c9832cd43a22686.txt
@@ -1,2 +1,6 @@
+---
+source: "Engine::BlockCommentsTest#test_0005_evaluation: ruby block comments inside erb tags"
+input: "{source: \"<%\\n=begin\\nThis is a comment\\n=end\\n%>\\nContent
\\n\", locals: {}, options: {}}"
+---
Content
diff --git a/test/snapshots/engine/block_comments_test/test_0006_evaluation_ruby_block_comments_with_code_before_and_after_c5e6a4e1e9e691af8dcc74ae6c9564c9.txt b/test/snapshots/engine/block_comments_test/test_0006_evaluation_ruby_block_comments_with_code_before_and_after_c5e6a4e1e9e691af8dcc74ae6c9564c9.txt
index d630b5b60..629a3de62 100644
--- a/test/snapshots/engine/block_comments_test/test_0006_evaluation_ruby_block_comments_with_code_before_and_after_c5e6a4e1e9e691af8dcc74ae6c9564c9.txt
+++ b/test/snapshots/engine/block_comments_test/test_0006_evaluation_ruby_block_comments_with_code_before_and_after_c5e6a4e1e9e691af8dcc74ae6c9564c9.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::BlockCommentsTest#test_0006_evaluation: ruby block comments with code before and after"
+input: "{source: \"<% x = 1 %>\\n<%\\n=begin\\nMulti-line comment\\nspanning multiple lines\\n=end\\n%>\\n<% y = 2 %>\\n<%= x + y %>
\\n\", locals: {x: 1, y: 2}, options: {}}"
+---
diff --git a/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_72379778fa34572e48b949a780f761b1.txt b/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_72379778fa34572e48b949a780f761b1.txt
index b86d395f2..37d41a5be 100644
--- a/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_72379778fa34572e48b949a780f761b1.txt
+++ b/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_72379778fa34572e48b949a780f761b1.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::BlockCommentsTest#test_0007_ruby block comments with =begin and =end mutliline and no space before ERB closing tag"
+input: "{source: \"<%\\n=begin%>\\n This, while unusual, is a legal form of commenting.\\n<%\\n=end%>\\nHey there
\\n\", options: {}}"
+---
_buf = ::String.new;
=begin
diff --git a/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_e1b62f3b00e8efb6cac1e5842461de10.txt b/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_e1b62f3b00e8efb6cac1e5842461de10.txt
index a6a4497b5..4e4bbb95d 100644
--- a/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_e1b62f3b00e8efb6cac1e5842461de10.txt
+++ b/test/snapshots/engine/block_comments_test/test_0007_ruby_block_comments_with_=begin_and_=end_mutliline_and_no_space_before_ERB_closing_tag_e1b62f3b00e8efb6cac1e5842461de10.txt
@@ -1,2 +1,6 @@
+---
+source: "Engine::BlockCommentsTest#test_0007_ruby block comments with =begin and =end mutliline and no space before ERB closing tag"
+input: "{source: \"<%\\n=begin%>\\n This, while unusual, is a legal form of commenting.\\n<%\\n=end%>\\nHey there
\\n\", locals: {}, options: {}}"
+---
Hey there
diff --git a/test/snapshots/engine/debug_mode_test/test_0001_debug_mode_disabled_by_default_1ae6b8eb8b1931a65192bc14b7593e1c.txt b/test/snapshots/engine/debug_mode_test/test_0001_debug_mode_disabled_by_default_1ae6b8eb8b1931a65192bc14b7593e1c.txt
index 5b6ca0f26..7b7f9fca2 100644
--- a/test/snapshots/engine/debug_mode_test/test_0001_debug_mode_disabled_by_default_1ae6b8eb8b1931a65192bc14b7593e1c.txt
+++ b/test/snapshots/engine/debug_mode_test/test_0001_debug_mode_disabled_by_default_1ae6b8eb8b1931a65192bc14b7593e1c.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::DebugModeTest#test_0001_debug mode disabled by default"
+input: "{source: \"Hello <%= @name %>!
\", options: {}}"
+---
_buf = ::String.new;
_buf << 'Hello '.freeze; _buf << (@name).to_s; _buf << '!
'.freeze;
_buf.to_s
diff --git a/test/snapshots/engine/debug_mode_test/test_0002_debug_mode_enabled_71a0c34d23cde4f85d84b577b3ac6e86.txt b/test/snapshots/engine/debug_mode_test/test_0002_debug_mode_enabled_71a0c34d23cde4f85d84b577b3ac6e86.txt
index 01bf762c8..54f1b7e40 100644
--- a/test/snapshots/engine/debug_mode_test/test_0002_debug_mode_enabled_71a0c34d23cde4f85d84b577b3ac6e86.txt
+++ b/test/snapshots/engine/debug_mode_test/test_0002_debug_mode_enabled_71a0c34d23cde4f85d84b577b3ac6e86.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::DebugModeTest#test_0002_debug mode enabled"
+input: "{source: \"Hello <%= @name %>!
\", options: {debug: true}}"
+---
_buf = ::String.new;
_buf << 'Hello '.freeze; _buf << (@name).to_s; _buf << '!
'.freeze;
_buf.to_s
diff --git a/test/snapshots/engine/debug_mode_test/test_0003_debug_mode_options_831362fdf630e5facad634abab817ddd.txt b/test/snapshots/engine/debug_mode_test/test_0003_debug_mode_options_831362fdf630e5facad634abab817ddd.txt
index 214d8c46b..7e5bc82cd 100644
--- a/test/snapshots/engine/debug_mode_test/test_0003_debug_mode_options_831362fdf630e5facad634abab817ddd.txt
+++ b/test/snapshots/engine/debug_mode_test/test_0003_debug_mode_options_831362fdf630e5facad634abab817ddd.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::DebugModeTest#test_0003_debug mode options"
+input: "{source: \"Test
\", options: {debug: true, filename: \"app/views/test.html.erb\"}}"
+---
_buf = ::String.new;
_buf << 'Test
'.freeze;
_buf.to_s
diff --git a/test/snapshots/engine/debug_mode_test/test_0004_visible_erb_expression_gets_debug_span_9431501e9722fe8b38c66468fd77c1f5.txt b/test/snapshots/engine/debug_mode_test/test_0004_visible_erb_expression_gets_debug_span_9431501e9722fe8b38c66468fd77c1f5.txt
index ad598c6b7..ad06d3be8 100644
--- a/test/snapshots/engine/debug_mode_test/test_0004_visible_erb_expression_gets_debug_span_9431501e9722fe8b38c66468fd77c1f5.txt
+++ b/test/snapshots/engine/debug_mode_test/test_0004_visible_erb_expression_gets_debug_span_9431501e9722fe8b38c66468fd77c1f5.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::DebugModeTest#test_0004_visible erb expression gets debug span"
+input: "{source: \"Welcome <%= @user.name %>!
\", options: {debug: true, filename: \"test.html.erb\"}}"
+---
_buf = ::String.new;
_buf << 'Welcome '.freeze; _buf << (@user.name).to_s; _buf << '!
'.freeze;
_buf.to_s
diff --git a/test/snapshots/engine/debug_mode_test/test_0005_multiple_visible_erb_expressions_get_debug_spans_78e7fde7b24d6ebbef7b0cc3e02dfeeb.txt b/test/snapshots/engine/debug_mode_test/test_0005_multiple_visible_erb_expressions_get_debug_spans_78e7fde7b24d6ebbef7b0cc3e02dfeeb.txt
index bbc5f722a..3dc1a6c9f 100644
--- a/test/snapshots/engine/debug_mode_test/test_0005_multiple_visible_erb_expressions_get_debug_spans_78e7fde7b24d6ebbef7b0cc3e02dfeeb.txt
+++ b/test/snapshots/engine/debug_mode_test/test_0005_multiple_visible_erb_expressions_get_debug_spans_78e7fde7b24d6ebbef7b0cc3e02dfeeb.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::DebugModeTest#test_0005_multiple visible erb expressions get debug spans"
+input: "{source: \"Hello <%= @name %> on <%= Date.today %>!
\", options: {debug: true, filename: \"test.html.erb\"}}"
+---
_buf = ::String.new;
_buf << 'Hello '.freeze; _buf << (@name).to_s; _buf << ' on '.freeze; _buf << (Date.today).to_s; _buf << '!
'.freeze;
_buf.to_s
diff --git a/test/snapshots/engine/debug_mode_test/test_0006_attribute_erb_expressions_do_NOT_get_debug_spans_9827f669a2c87b0da29ee3e73f2485a8.txt b/test/snapshots/engine/debug_mode_test/test_0006_attribute_erb_expressions_do_NOT_get_debug_spans_9827f669a2c87b0da29ee3e73f2485a8.txt
index ccefe8f75..3cd1d38a5 100644
--- a/test/snapshots/engine/debug_mode_test/test_0006_attribute_erb_expressions_do_NOT_get_debug_spans_9827f669a2c87b0da29ee3e73f2485a8.txt
+++ b/test/snapshots/engine/debug_mode_test/test_0006_attribute_erb_expressions_do_NOT_get_debug_spans_9827f669a2c87b0da29ee3e73f2485a8.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::DebugModeTest#test_0006_attribute erb expressions do NOT get debug spans"
+input: "{source: \"\\\" data-id=\\\"<%= @user.id %>\\\">Content
\", options: {debug: true, filename: \"test.html.erb\"}}"
+---
_buf = ::String.new;
_buf << 'Content
'.freeze;
_buf.to_s
diff --git a/test/snapshots/engine/debug_mode_test/test_0007_script_content_erb_expressions_do_NOT_get_debug_spans_fa19152dbae94261cb892c6fe543ee74.txt b/test/snapshots/engine/debug_mode_test/test_0007_script_content_erb_expressions_do_NOT_get_debug_spans_fa19152dbae94261cb892c6fe543ee74.txt
index 39c7e0cf9..0cbd20c82 100644
--- a/test/snapshots/engine/debug_mode_test/test_0007_script_content_erb_expressions_do_NOT_get_debug_spans_fa19152dbae94261cb892c6fe543ee74.txt
+++ b/test/snapshots/engine/debug_mode_test/test_0007_script_content_erb_expressions_do_NOT_get_debug_spans_fa19152dbae94261cb892c6fe543ee74.txt
@@ -1,3 +1,7 @@
+---
+source: "Engine::DebugModeTest#test_0007_script content erb expressions do NOT get debug spans"
+input: "{source: \"\\n\", options: {debug: true}}"
+---
_buf = ::String.new;
_buf << '\\n