Skip to content

Commit

Permalink
Datamapper test: Only migrate if needed, so we don't delete previous …
Browse files Browse the repository at this point in the history
…data.
  • Loading branch information
tomas committed Apr 18, 2012
1 parent 9e8be29 commit 8455b57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/datamapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.