forked from DavyJonesLocker/postgres_ext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support to export and import extensions (think hstore, postgis)
- Loading branch information
Keenan Brock
committed
Dec 7, 2012
1 parent
2d42ce4
commit 47d5c1f
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'spec_helper' | ||
|
||
describe 'extension schema dump' do | ||
let!(:connection) { ActiveRecord::Base.connection } | ||
it 'correctly creates and exports database extensions' do | ||
stream = StringIO.new | ||
connection.add_extension 'hstore' | ||
|
||
ActiveRecord::SchemaDumper.dump(connection, stream) | ||
output = stream.string | ||
|
||
output.should match /add_extension "hstore"/ | ||
end | ||
end |