hyperion-sqlite 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.
Files changed (2) hide show
  1. data/spec/hyperion/sqlite_spec.rb +28 -0
  2. metadata +4 -4
@@ -26,6 +26,32 @@ describe Hyperion::Sqlite 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 account (
32
+ id INTEGER PRIMARY KEY,
33
+ first_name VARCHAR(35),
34
+ inti INTEGER,
35
+ data VARCHAR(32)
36
+ );
37
+ QUERY
38
+ execute <<-QUERY
39
+ CREATE TABLE shirt (
40
+ id INTEGER PRIMARY KEY,
41
+ account_key INTEGER,
42
+ first_name VARCHAR(35),
43
+ inti INTEGER,
44
+ data VARCHAR(32),
45
+ FOREIGN KEY (account_key) REFERENCES account(id)
46
+ );
47
+ QUERY
48
+ end
49
+
50
+ def drop_foreign_key_test_tables
51
+ drop_table(:shirt)
52
+ drop_table(:account)
53
+ end
54
+
29
55
  TABLES = ['testing', 'other_testing']
30
56
 
31
57
  around :each do |example|
@@ -37,12 +63,14 @@ describe Hyperion::Sqlite do
37
63
  before :each do |example|
38
64
  Hyperion::Sql.with_connection(CONNECTION_URL) do
39
65
  TABLES.each { |table| create_table(table) }
66
+ create_foreign_key_test_tables
40
67
  end
41
68
  end
42
69
 
43
70
  after :each do |example|
44
71
  Hyperion::Sql.with_connection(CONNECTION_URL) do
45
72
  TABLES.each { |table| drop_table(table) }
73
+ drop_foreign_key_test_tables
46
74
  end
47
75
  end
48
76
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperion-sqlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
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-17 00:00:00.000000000 Z
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.0
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.0
45
+ version: 0.1.1
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: do_sqlite3
48
48
  requirement: !ruby/object:Gem::Requirement