Merge pull request #5540 from mhfs/another_blank_line_fix

Avoid another blank line in generated migration and remove assertion as per @spastorino request
This commit is contained in:
Piotr Sarnacki 2012-03-21 18:03:17 -07:00
commit 64249223eb
2 changed files with 1 additions and 2 deletions

@ -26,7 +26,7 @@ def down
<%= migration_action == 'add' ? 'remove' : 'add' %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'remove' %>, :<%= attribute.type %><%= attribute.inject_options %><% end %>
<%- if attribute.has_index? && migration_action == 'remove' -%>
add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %>
<%- end %>
<%- end -%>
<%- end -%>
<%- end -%>
end

@ -37,7 +37,6 @@ def test_add_migration_with_attributes
assert_method :change, content do |up|
assert_match(/add_column :posts, :title, :string/, up)
assert_match(/add_column :posts, :body, :text/, up)
assert_no_match(/\n\n/, up)
end
end
end