Sha256: 116deb415d4737bb37dc134113e2ad71b2f28a625b4821a3a8b6ccdf974d6546

Contents?: true

Size: 696 Bytes

Versions: 23

Compression:

Stored size: 696 Bytes

Contents

# coding: utf-8
require File.dirname(__FILE__) + '/spec_helper'

describe 'Rails field_error_proc' do
  
  include FormtasticSpecHelper
  
  before do
    @output_buffer = ''
    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|
      ::ActionView::Base.field_error_proc.should_not == current_field_error_proc
    end
    
    ::ActionView::Base.field_error_proc.should == current_field_error_proc
    
    form_for(@new_post) do |builder|
      ::ActionView::Base.field_error_proc.should == current_field_error_proc
    end
  end
  
end

Version data entries

23 entries across 23 versions & 5 rubygems

Version Path
formtastic-1.0.1 spec/error_proc_spec.rb
formtastic-1.0.0 spec/error_proc_spec.rb
formtastic-1.0.0.rc2 spec/error_proc_spec.rb
formtastic-1.0.0.rc spec/error_proc_spec.rb
formtastic-1.0.0.beta4 spec/error_proc_spec.rb
formtastic-rails3-0.9.10.1 spec/error_proc_spec.rb
formtastic-1.0.0.beta3 spec/error_proc_spec.rb
formtastic-1.0.0.beta2 spec/error_proc_spec.rb
formtastic-1.0.0.beta spec/error_proc_spec.rb
formtastic-rails3-0.9.10.0 spec/error_proc_spec.rb
formtastic-0.9.10 spec/error_proc_spec.rb
formtastic-0.9.9 spec/error_proc_spec.rb
formtastic-0.9.8 spec/error_proc_spec.rb
jintastic-1.1.0 vendor/plugins/formtastic/spec/error_proc_spec.rb
jintastic-1.0.2 vendor/plugins/formtastic/spec/error_proc_spec.rb
tmayad-formtastic-0.9.7 spec/error_proc_spec.rb
ShadowBelmolve-formtastic-0.9.7 spec/error_proc_spec.rb
formtastic-0.9.7 spec/error_proc_spec.rb
formtastic-0.9.6 spec/error_proc_spec.rb
formtastic-0.9.5 spec/error_proc_spec.rb