hyperion-postgres 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/spec/hyperion/postgres_spec.rb +27 -0
- metadata +4 -4
@@ -26,6 +26,31 @@ describe Hyperion::Postgres do
|
|
26
26
|
execute "DROP TABLE IF EXISTS #{table_name};"
|
27
27
|
end
|
28
28
|
|
29
|
+
def create_foreign_key_test_tables
|
30
|
+
execute <<-QUERY
|
31
|
+
CREATE TABLE IF NOT EXISTS account (
|
32
|
+
id SERIAL PRIMARY KEY,
|
33
|
+
first_name VARCHAR(35),
|
34
|
+
inti INTEGER,
|
35
|
+
data VARCHAR(32)
|
36
|
+
);
|
37
|
+
QUERY
|
38
|
+
execute <<-QUERY
|
39
|
+
CREATE TABLE IF NOT EXISTS shirt (
|
40
|
+
id SERIAL PRIMARY KEY,
|
41
|
+
account_key INTEGER REFERENCES account,
|
42
|
+
first_name VARCHAR(35),
|
43
|
+
inti INTEGER,
|
44
|
+
data VARCHAR(32)
|
45
|
+
);
|
46
|
+
QUERY
|
47
|
+
end
|
48
|
+
|
49
|
+
def drop_foreign_key_test_tables
|
50
|
+
drop_table(:shirt)
|
51
|
+
drop_table(:account)
|
52
|
+
end
|
53
|
+
|
29
54
|
TABLES = ['testing', 'other_testing']
|
30
55
|
|
31
56
|
around :each do |example|
|
@@ -37,12 +62,14 @@ describe Hyperion::Postgres do
|
|
37
62
|
before :each do |example|
|
38
63
|
Hyperion::Sql.with_connection(CONNECTION_URL) do
|
39
64
|
TABLES.each { |table| create_table(table) }
|
65
|
+
create_foreign_key_test_tables
|
40
66
|
end
|
41
67
|
end
|
42
68
|
|
43
69
|
after :each do |example|
|
44
70
|
Hyperion::Sql.with_connection(CONNECTION_URL) do
|
45
71
|
TABLES.each { |table| drop_table(table) }
|
72
|
+
drop_foreign_key_test_tables
|
46
73
|
end
|
47
74
|
end
|
48
75
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyperion-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - '='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.1.
|
37
|
+
version: 0.1.1
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - '='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.1.
|
45
|
+
version: 0.1.1
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: do_postgres
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|