Skip to content

Commit 963a51f

Browse files
author
Jake Boxer
committed
Fix live view reloading in production spec
* Change contents of <title> instead of <h2>
1 parent 0c95167 commit 963a51f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/application_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@
330330
# Load index.html.erb and change the title to "Changed"
331331
index_file_path = File.join(root, "app", "views", "index.html.erb")
332332
index_file_data = File.read(index_file_path)
333-
index_file_data.sub!(/<h2>[^<]*<\/h2>/, "<h2>Changed</h2>")
333+
index_file_data.sub!("<title>ERB</title>", "<title>Changed</title>")
334334
File.write(index_file_path, index_file_data)
335335

336336
# On the second request, <title> text should still be "ERB"

0 commit comments

Comments
 (0)