diff --git a/spec/lib/tabular_form_builder_spec.rb b/spec/lib/tabular_form_builder_spec.rb index 57f8a7133b..ee978df1e5 100644 --- a/spec/lib/tabular_form_builder_spec.rb +++ b/spec/lib/tabular_form_builder_spec.rb @@ -538,18 +538,14 @@ JJ Abrams describe 'labels for fields' do let(:options) { {} } shared_examples_for "generated label" do - def remove_form_field_container(string) - string.gsub(/.+<\/span>/m,'') - end - def expected_label_like(expected_title) - expect(remove_form_field_container(output)).to be_html_eql(%{ + expect(output).to be_html_eql(%{ - }) + }).at_path('label') end context 'with a label specified as string' do