Browse files

Datamapper test: Only migrate if needed, so we don't delete previous …

…data.
  • Loading branch information...
1 parent 9e8be29 commit 8455b57ba1bba6e22378ea349d43b35b40f9fdc6 @tomas committed Apr 18, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 test/datamapper.rb
View
6 test/datamapper.rb
@@ -48,4 +48,8 @@ class Cinema < Place
end
-DataMapper.auto_migrate!
+begin
+ City.count
+rescue DataObjects::SyntaxError
+ DataMapper.auto_migrate!
+end

0 comments on commit 8455b57

Please sign in to comment.