snails 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/snails/rspec.rb +3 -3
- data/snails.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d701dfaa7188919123a884e8e9aec8d6ba3e0d2f39d445bbd81d5ed51f1845ab
|
4
|
+
data.tar.gz: 90de0da81b97412d2dcf153d7fc8cf5f10a52550f1209546b9df0eeed4cff7fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a87265e8163cd0b39159f7b83fc06ccd33a5d886ebc33553a5f8f4ee5ce6fd8be2d876a466f272c1057fecb0e65a56ac698d20d1b8a7392cb4529053a7c404e0
|
7
|
+
data.tar.gz: 3395ab624d2da2a63c7b27b2c8989b3a6dd3a77fe31e8fefd4da4483198a6c3262547e8ec9c3b53d8652906a401b6d694e9ed326e07c196bc764ff158be04dcd
|
data/lib/snails/rspec.rb
CHANGED
@@ -7,13 +7,13 @@ require 'snails'
|
|
7
7
|
# Bundler.require(:default, :test)
|
8
8
|
|
9
9
|
RSpec.configure do |config|
|
10
|
-
def
|
11
|
-
ActiveRecord::Base.connection.instance_variable_get('@config')[:database]
|
10
|
+
def db_name
|
11
|
+
ActiveRecord::Base.connection.instance_variable_get('@config')[:database]
|
12
12
|
end
|
13
13
|
|
14
14
|
def load_db!
|
15
15
|
db_schema = "./db/schema.rb"
|
16
|
-
if defined?(ActiveRecord) and File.exist?(db_schema) and
|
16
|
+
if defined?(ActiveRecord) and File.exist?(db_schema) and db_name == ':memory:'
|
17
17
|
puts "Loading in-memory database schema."
|
18
18
|
load db_schema
|
19
19
|
end
|
data/snails.gemspec
CHANGED