From 43c38d74bde355023ce94394e401a379cbbb63ac Mon Sep 17 00:00:00 2001 From: Nitish Jha <151559388+Nj221102@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:22:56 +0530 Subject: [PATCH] "Tests fixed" --- tasks/check_html_fixtures.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tasks/check_html_fixtures.rb b/tasks/check_html_fixtures.rb index b2ca34796..4aec8aebb 100644 --- a/tasks/check_html_fixtures.rb +++ b/tasks/check_html_fixtures.rb @@ -107,16 +107,14 @@ def format_html(html) ) # puts formatted_html pretty_html = HtmlBeautifier.beautify(html) - begin + # Compare to fixture dir_path = "test/wv/html_fixtures" file_path = "#{dir_path}/#{file_name.split(".")[0]}.html" expected_output = File.read(file_path) - rescue => e - raise "hey , you need to regenerate fixtures , do this rake test:regenerate_html_fixtures" - end + # Do the comparison # diff = Diff::LCS.diff(pretty_html, expected_output) diff_output = diff_as_string(pretty_html, expected_output, file_name)