Permalink
Browse files

Implement FileInput.

  • Loading branch information...
1 parent 11d2628 commit 28daa8dbd42d4c276316bf53bdb758f73fe1a634 @mjbellantoni committed Sep 2, 2012
@@ -13,7 +13,7 @@ module Inputs
autoload :DatetimeInput, "formtastic-bootstrap/inputs/datetime_input"
autoload :DatetimeSelectInput, "formtastic-bootstrap/inputs/datetime_select_input"
autoload :EmailInput, "formtastic-bootstrap/inputs/email_input"
- # autoload :FileInput
+ autoload :FileInput, "formtastic-bootstrap/inputs/file_input"
# autoload :HiddenInput
# autoload :NumberInput
# autoload :NumericInput
@@ -4,7 +4,7 @@ class FileInput < Formtastic::Inputs::FileInput
include Base
def to_html
- generic_input_wrapping do
+ bootstrap_wrapping do
builder.file_field(method, input_html_options)
end
end
@@ -15,9 +15,8 @@
end)
end
+ it_should_have_bootstrap_horizontal_wrapping
it_should_have_input_wrapper_with_class("file")
- it_should_have_input_wrapper_with_class(:clearfix)
- it_should_have_input_class_in_the_right_place
it_should_have_input_wrapper_with_id("post_body_input")
it_should_have_label_with_text(/Body/)
it_should_have_label_for("post_body")
@@ -29,7 +28,7 @@
concat(semantic_form_for(@new_post) do |builder|
concat(builder.input(:title, :as => :file, :input_html => { :class => 'myclass' }))
end)
- output_buffer.should have_tag("form div.clearfix div.input input.myclass")
+ output_buffer.should have_tag("form div.control-group div.controls input.myclass")
end
describe "when namespace is provided" do

0 comments on commit 28daa8d

Please sign in to comment.