restpack_service 0.0.78 → 0.0.79
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/restpack_service/support/spec_helper.rb +25 -0
- data/lib/restpack_service/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69bb16415d86f68ccf5d0f0252d982ad4d9560d6
|
4
|
+
data.tar.gz: 564b40e8c630d5f0b1730f1974ff1e2625c9b14c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1f45547af09683e3140dbc1811f2e2180c19cf03752b8f39b4f5698ed1a16a06fd58c382e4a05cb04e2052b512522004ba5d712c42ad7bc9d54c4a0320aa90e
|
7
|
+
data.tar.gz: ae010f8c67ef97277f505b0622fc028177fcc63c37de6d06553d8e7abde76aa7a77c1bbf8679d78c7a91856c3686584f92951e190b7f2dcc9d53678df528efd3
|
@@ -3,5 +3,30 @@ require 'database_cleaner'
|
|
3
3
|
require 'yaml'
|
4
4
|
require 'shoulda-matchers'
|
5
5
|
require 'factory_girl'
|
6
|
+
require 'pry'
|
6
7
|
|
7
8
|
require_relative 'matchers'
|
9
|
+
|
10
|
+
def setup
|
11
|
+
config = YAML.load_file('./config/database.yml')
|
12
|
+
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || config['test'])
|
13
|
+
|
14
|
+
migrations_path = File.dirname(__FILE__) + "/../db/migrate"
|
15
|
+
migrations = ActiveRecord::Migrator.up(migrations_path)
|
16
|
+
|
17
|
+
FactoryGirl.find_definitions
|
18
|
+
|
19
|
+
DatabaseCleaner.strategy = :transaction
|
20
|
+
|
21
|
+
RSpec.configure do |config|
|
22
|
+
config.include FactoryGirl::Syntax::Methods
|
23
|
+
|
24
|
+
config.before(:each) do
|
25
|
+
DatabaseCleaner.start
|
26
|
+
end
|
27
|
+
|
28
|
+
config.after(:each) do
|
29
|
+
DatabaseCleaner.clean
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|