require 'test_helper' class BootstrapFormBuilder::FormBuilderTest < ActiveSupport::TestCase include ActionView::Helpers include BootstrapFormBuilder::Helpers attr_accessor :output_buffer def protect_against_forgery?() end class ::Book extend ActiveModel::Naming include ActiveModel::Conversion attr_accessor :author_id, :title, :passphrase def persisted?() end end def books_path(*args) '/books' end setup do @output_buffer = '' @book = Book.new end test '#text_field outputs a clearfix div' do concat(bootstrap_form_for(@book) { |f| concat(f.text_field(:title)) }) assert_match output_buffer, %r{