-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3a96c5
commit 69a5d04
Showing
7 changed files
with
107 additions
and
89 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
require 'spec_helper' | ||
|
||
describe 'daterange schema dump' do | ||
let!(:connection) { ActiveRecord::Base.connection } | ||
after { connection.drop_table :testings } | ||
|
||
it 'correctly generates daterange column statements' do | ||
stream = StringIO.new | ||
connection.create_table :testings do |t| | ||
t.daterange :range | ||
end | ||
|
||
ActiveRecord::SchemaDumper.dump(connection, stream) | ||
output = stream.string | ||
|
||
output.should match /t\.daterange "range"/ | ||
end | ||
end |
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,18 @@ | ||
require 'spec_helper' | ||
|
||
describe 'intrange schema dump' do | ||
let!(:connection) { ActiveRecord::Base.connection } | ||
after { connection.drop_table :testings } | ||
|
||
it 'correctly generates int4range column statements' do | ||
stream = StringIO.new | ||
connection.create_table :testings do |t| | ||
t.int4range :range | ||
end | ||
|
||
ActiveRecord::SchemaDumper.dump(connection, stream) | ||
output = stream.string | ||
|
||
output.should match /t\.int4range "range"/ | ||
end | ||
end |
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,18 @@ | ||
require 'spec_helper' | ||
|
||
describe 'int8range schema dump' do | ||
let!(:connection) { ActiveRecord::Base.connection } | ||
after { connection.drop_table :testings } | ||
|
||
it 'correctly generates int8range column statements' do | ||
stream = StringIO.new | ||
connection.create_table :testings do |t| | ||
t.int8range :range | ||
end | ||
|
||
ActiveRecord::SchemaDumper.dump(connection, stream) | ||
output = stream.string | ||
|
||
output.should match /t\.int8range "range"/ | ||
end | ||
end |
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,18 @@ | ||
require 'spec_helper' | ||
|
||
describe 'numrange schema dump' do | ||
let!(:connection) { ActiveRecord::Base.connection } | ||
after { connection.drop_table :testings } | ||
|
||
it 'correctly generates numrange column statements' do | ||
stream = StringIO.new | ||
connection.create_table :testings do |t| | ||
t.numrange :range | ||
end | ||
|
||
ActiveRecord::SchemaDumper.dump(connection, stream) | ||
output = stream.string | ||
|
||
output.should match /t\.numrange "range"/ | ||
end | ||
end |
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,18 @@ | ||
require 'spec_helper' | ||
|
||
describe 'tsrange schema dump' do | ||
let!(:connection) { ActiveRecord::Base.connection } | ||
after { connection.drop_table :testings } | ||
|
||
it 'correctly generates tsrange column statements' do | ||
stream = StringIO.new | ||
connection.create_table :testings do |t| | ||
t.tsrange :range | ||
end | ||
|
||
ActiveRecord::SchemaDumper.dump(connection, stream) | ||
output = stream.string | ||
|
||
output.should match /t\.tsrange "range"/ | ||
end | ||
end |
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,17 @@ | ||
require 'spec_helper' | ||
|
||
describe 'tstzrange schema dump' do | ||
let!(:connection) { ActiveRecord::Base.connection } | ||
after { connection.drop_table :testings } | ||
it 'correctly generates tstzrange column statements' do | ||
stream = StringIO.new | ||
connection.create_table :testings do |t| | ||
t.tstzrange :range | ||
end | ||
|
||
ActiveRecord::SchemaDumper.dump(connection, stream) | ||
output = stream.string | ||
|
||
output.should match /t\.tstzrange "range"/ | ||
end | ||
end |