Sha256: d569997a1b6676a3e2b16cd8095e27e9ab83adb14957b95bccdae48e7ce54417

Contents?: true

Size: 877 Bytes

Versions: 14

Compression:

Stored size: 877 Bytes

Contents

require File.expand_path("#{File.dirname(__FILE__)}/rails_spec_helper")

describe Erector::Rails::FormBuilder do
  describe ".parent_builder_class" do
    it "defaults to ActionView::Base.default_form_builder" do
      Erector::Rails::FormBuilder.parent_builder_class.should == ActionView::Base.default_form_builder
    end
  end

  describe ".wrapping" do
    it "returns self when passed nil" do
      Erector::Rails::FormBuilder.wrapping(nil).should == Erector::Rails::FormBuilder
    end

    it "returns a FormBuilder subclass with the specified parent_builder_class" do
      my_form_builder = Class.new(ActionView::Base.default_form_builder)
      Erector::Rails::FormBuilder.wrapping(my_form_builder).parent_builder_class.should == my_form_builder
      Erector::Rails::FormBuilder.parent_builder_class.should == ActionView::Base.default_form_builder
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
erector-rails4-0.1.3 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.1.2 spec/dummy/spec/form_builder_spec.rb
erector-0.10.0 spec/rails_root/spec/form_builder_spec.rb
erector-rails4-0.1.1 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.1.0 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.0.7 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.0.6 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.0.5 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.0.4 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.0.3 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.0.2 spec/dummy/spec/form_builder_spec.rb
erector-rails4-0.0.1 spec/dummy/spec/form_builder_spec.rb
erector-0.9.0 spec/rails_root/spec/form_builder_spec.rb
erector-0.9.0.pre1 spec/rails_root/spec/form_builder_spec.rb