Permalink
Browse files

Whitespaces

  • Loading branch information...
1 parent 5da1254 commit 619888ad5bd1d81b80bdda2dd9fa821fcdf917be @rafaelfranca rafaelfranca committed Sep 8, 2011
@@ -40,7 +40,7 @@ def simple_form_for(record, options={}, &block)
form_for(record, options, &block)
end
end
-
+
def css_class(record, html_options)
if html_options.key?(:class)
html_options[:class]
@@ -2,7 +2,7 @@ module SimpleForm
module Helpers
module HasErrors
private
-
+
def errors
object.errors
end
@@ -12,4 +12,4 @@ def has_errors?
end
end
end
-end
+end
@@ -46,12 +46,12 @@ class FormHelperTest < ActionView::TestCase
concat(simple_form_for(@user) do |f| end)
assert_select 'form.simple_form.user'
end
-
+
test 'simple form should not add object class to form if css_class is specified' do
concat(simple_form_for(:user, :html => {:class => nil}) do |f| end)
assert_no_select 'form.user'
end
-
+
test 'simple form should add custom class to form if css_class is specified' do
concat(simple_form_for(:user, :html => {:class => 'my_class'}) do |f| end)
assert_select 'form.my_class'
View
@@ -14,8 +14,8 @@ class CustomizedInput < SimpleForm::Inputs::StringInput
def input
"<section>#{super}</section>".html_safe
end
-
+
def input_method
:text_field
end
-end
+end
@@ -408,10 +408,10 @@ def with_association_for(object, *args)
assert_select 'form p input#user_name.string'
end
end
-
+
test 'builder support no wrapping when wrapper is false' do
- with_form_for @user, :name, :wrapper => false
- assert_select 'form > label[for=user_name]'
+ with_form_for @user, :name, :wrapper => false
+ assert_select 'form > label[for=user_name]'
assert_select 'form > input#user_name.string'
end

0 comments on commit 619888a

Please sign in to comment.