Small clean up.
This commit is contained in:
parent
f1b9d2dfc3
commit
b8939a17bf
|
@ -117,11 +117,7 @@ module SimpleForm
|
||||||
|
|
||||||
# Retrieves a given wrapper
|
# Retrieves a given wrapper
|
||||||
def self.wrapper(name)
|
def self.wrapper(name)
|
||||||
if wrapper = @@wrappers[name.to_sym]
|
@@wrappers[name.to_sym] or raise WrapperNotFound, "Couldn't find wrapper with name #{name}"
|
||||||
wrapper
|
|
||||||
else
|
|
||||||
raise WrapperNotFound, "Couldn't find wrapper with name #{name}"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Raised when fails to find a given wrapper name
|
# Raised when fails to find a given wrapper name
|
||||||
|
|
|
@ -118,7 +118,6 @@ class WrapperTest < ActionView::TestCase
|
||||||
with_form_for @user, :name, :wrapper => "another"
|
with_form_for @user, :name, :wrapper => "another"
|
||||||
assert_select "section.custom_wrapper div.another_wrapper label"
|
assert_select "section.custom_wrapper div.another_wrapper label"
|
||||||
assert_select "section.custom_wrapper div.another_wrapper input.string"
|
assert_select "section.custom_wrapper div.another_wrapper input.string"
|
||||||
output_buffer.replace ""
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue