Sha256: 288180bff1be68484e414fc8e5bad01fc1b83cb1da6856480b3a1bc3c12a070e
Contents?: true
Size: 733 Bytes
Versions: 1
Compression:
Stored size: 733 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true require 'spec_helper' RSpec.describe 'Rails field_error_proc' do include FormtasticSpecHelper before do @output_buffer = ActionView::OutputBuffer.new '' mock_everything end it "should not be overridden globally for all form builders" do current_field_error_proc = ::ActionView::Base.field_error_proc semantic_form_for(@new_post) do |builder| expect(::ActionView::Base.field_error_proc).not_to eq(current_field_error_proc) end expect(::ActionView::Base.field_error_proc).to eq(current_field_error_proc) form_for(@new_post) do |builder| expect(::ActionView::Base.field_error_proc).to eq(current_field_error_proc) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
formtastic-5.0.0 | spec/builder/error_proc_spec.rb |