From 54c824b3d3580808fd5502c6c6bcbe9be5528e20 Mon Sep 17 00:00:00 2001 From: Harshal LADHE Date: Thu, 25 May 2023 07:24:18 +0530 Subject: [PATCH] Removed `strip_heredoc` from specs --- spec/install_generator_spec.rb | 2 +- .../bootstrap_form_layout_spec.rb | 4 +- .../inputs/text_field_spec.rb | 38 +++++++++---------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/spec/install_generator_spec.rb b/spec/install_generator_spec.rb index 52e4ab2..71eafbb 100644 --- a/spec/install_generator_spec.rb +++ b/spec/install_generator_spec.rb @@ -24,7 +24,7 @@ it "matches the content of initializer file" do assert_file("config/initializers/rails_bootstrap_form.rb") do |content| assert_includes(content, - <<-STRING.strip_heredoc + <<~STRING RailsBootstrapForm.configure do |config| # to make forms non-compliant with W3C. config.default_form_attributes = {role: "form", novalidate: true} diff --git a/spec/rails_bootstrap_form/bootstrap_form_layout_spec.rb b/spec/rails_bootstrap_form/bootstrap_form_layout_spec.rb index 8e9b274..628e8e9 100644 --- a/spec/rails_bootstrap_form/bootstrap_form_layout_spec.rb +++ b/spec/rails_bootstrap_form/bootstrap_form_layout_spec.rb @@ -8,7 +8,7 @@ RSpec.describe RailsBootstrapForm::BootstrapFormBuilder do it "checks markup of vertical form" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -58,7 +58,7 @@ end it "checks markup of horizontal form" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
diff --git a/spec/rails_bootstrap_form/inputs/text_field_spec.rb b/spec/rails_bootstrap_form/inputs/text_field_spec.rb index 9fbba1c..8f47113 100644 --- a/spec/rails_bootstrap_form/inputs/text_field_spec.rb +++ b/spec/rails_bootstrap_form/inputs/text_field_spec.rb @@ -9,7 +9,7 @@ RSpec.describe RailsBootstrapForm::Inputs::TextField do describe "#text_field" do it "renders text field correctly in vertical layout" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -22,7 +22,7 @@ end it "renders text field correctly in horizontal layout" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -37,7 +37,7 @@ end it "supports floating labels in vertical layout" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -52,7 +52,7 @@ end it "does not support floating labels for horizontal layout" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -67,7 +67,7 @@ end it "skips label of the field" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -79,7 +79,7 @@ end it "hides label of the field" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -92,7 +92,7 @@ end it "adds additional css class to the field" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -105,7 +105,7 @@ end it "adds additional css class to a label of the field" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -118,7 +118,7 @@ end it "changes css class of the field" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -131,7 +131,7 @@ end it "changes css class of the label" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -144,7 +144,7 @@ end it "adds help text to the field" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -158,7 +158,7 @@ end it "displays help text from locale file" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -172,7 +172,7 @@ end it "sets customize label text" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -185,7 +185,7 @@ end it "adds additional wrapper options" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -198,7 +198,7 @@ end it "supports input group" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -215,7 +215,7 @@ end it "supports button in input group" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -231,7 +231,7 @@ end it "supports multiple addons in input group" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
@@ -249,7 +249,7 @@ end it "supports input group with floating labels" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML
$ @@ -268,7 +268,7 @@ end it "changes size of the field" do - expected = <<~HTML.strip_heredoc + expected = <<~HTML