Permalink
Browse files

Merge pull request #4288 from kennyj/fix_4285-2

(3-2-stable) Fix GH #4285. Remove options when we record calling create_table
  • Loading branch information...
2 parents 63f7a61 + 6012970 commit a10f30963d9dfb8b470e2ec5e293b20be8fcbe3d @josevalim josevalim committed Jan 4, 2012
@@ -59,7 +59,7 @@ def #{method}(*args) # def create_table(*args)
private
def invert_create_table(args)
- [:drop_table, args]
+ [:drop_table, [args.first]]
end
def invert_rename_table(args)
@@ -67,6 +67,12 @@ def test_invert_create_table
assert_equal [:drop_table, [:system_settings]], drop_table
end
+ def test_invert_create_table_with_options
+ @recorder.record :create_table, [:people_reminders, {:id => false}]
+ drop_table = @recorder.inverse.first
+ assert_equal [:drop_table, [:people_reminders]], drop_table
+ end
+
def test_invert_rename_table
@recorder.record :rename_table, [:old, :new]
rename = @recorder.inverse.first

0 comments on commit a10f309

Please sign in to comment.