Skip to content

Commit

Permalink
add failing test for blank_content_class
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake H committed Jul 21, 2012
1 parent 49351b7 commit 90f74de
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/attribute_test.rb
Expand Up @@ -171,4 +171,13 @@ class AttributeTest < ActionView::TestCase
assert_select "div.show_for p.user_email.wrapper", /Not specified/
assert_select "p.user_email strong.label", "Email"
end

test "show_for should wrap blank attributes with no_content" do
swap ShowFor, :blank_content_class => 'no_attribute' do
with_attributes_for @user, :name, :birthday
assert_select ".wrapper.user_birthday.no_attribute"
assert_select ".wrapper.user_name.no_attribute", false
end
end

end

0 comments on commit 90f74de

Please sign in to comment.