make_it_so 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e153f1537a2270bb678a3c1bfc143d637775136
|
4
|
+
data.tar.gz: 56b08bb355ac02b6ef80909c00885ced8b755e64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7bb389dd8ebf7a59580b6623a93ba14bc856029161669581190d5c8d22e187d2b56af2c72a809e5f43cc3e11ecdc82cf48941a7ec6b69e27747f6002e884948
|
7
|
+
data.tar.gz: 62d56568875e7eeeadbe8cf6ff12d7454b9b8badc5ac557a48b61055128bb913ccba578f7f582ad2817f3108d46a03d6768226bceb107393f63c59699fa67883
|
@@ -154,6 +154,17 @@ module MakeItSo
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
157
|
+
def database_cleaner_rspec
|
158
|
+
self.gem 'database_cleaner', group: [:development, :test]
|
159
|
+
after_bundle do
|
160
|
+
inside 'spec' do
|
161
|
+
inside 'support' do
|
162
|
+
template 'database_cleaner.rb'
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
157
168
|
def valid_attribute_rspec
|
158
169
|
self.gem 'valid_attribute', group: [:development, :test]
|
159
170
|
after_bundle do
|
data/lib/make_it_so/version.rb
CHANGED
@@ -131,6 +131,17 @@ feature 'user generates rails app' do
|
|
131
131
|
to include("require 'shoulda-matchers'")
|
132
132
|
end
|
133
133
|
end
|
134
|
+
|
135
|
+
context 'database_cleaner' do
|
136
|
+
it 'includes database_cleaner in the gemfile' do
|
137
|
+
expect(File.read(gemfile_path)).to include('database_cleaner')
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'creates the database_cleaner support file' do
|
141
|
+
support_path = join_paths(app_path, 'spec/support/database_cleaner.rb')
|
142
|
+
expect(FileTest.exists?(support_path)).to eq(true)
|
143
|
+
end
|
144
|
+
end
|
134
145
|
end
|
135
146
|
|
136
147
|
context 'devise' do
|
@@ -0,0 +1,25 @@
|
|
1
|
+
RSpec.configure do |config|
|
2
|
+
|
3
|
+
# before each test suite, dump the database completely
|
4
|
+
config.before(:suite) do
|
5
|
+
DatabaseCleaner.clean_with(:truncation)
|
6
|
+
end
|
7
|
+
|
8
|
+
# “sets the default database cleaning strategy to be transactions”
|
9
|
+
#
|
10
|
+
config.before(:each) do
|
11
|
+
DatabaseCleaner.strategy = :transaction
|
12
|
+
end
|
13
|
+
|
14
|
+
config.before(:each, :js => true) do
|
15
|
+
DatabaseCleaner.strategy = :truncation
|
16
|
+
end
|
17
|
+
|
18
|
+
config.before(:each) do
|
19
|
+
DatabaseCleaner.start
|
20
|
+
end
|
21
|
+
|
22
|
+
config.after(:each) do
|
23
|
+
DatabaseCleaner.clean
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: make_it_so
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Pickett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- templates/rails/spec/features/user_signs_up_spec.rb
|
198
198
|
- templates/rails/spec/javascript/exampleTest.js
|
199
199
|
- templates/rails/spec/javascript/testHelper.js
|
200
|
+
- templates/rails/spec/support/database_cleaner.rb
|
200
201
|
- templates/rails/spec/support/devise_controller_spec.rb
|
201
202
|
- templates/rails/spec/support/factory_bot.rb
|
202
203
|
- templates/rails/spec/support/valid_attribute.rb
|
@@ -229,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
230
|
version: '0'
|
230
231
|
requirements: []
|
231
232
|
rubyforge_project:
|
232
|
-
rubygems_version: 2.
|
233
|
+
rubygems_version: 2.6.13
|
233
234
|
signing_key:
|
234
235
|
specification_version: 4
|
235
236
|
summary: An application generator for all things ruby
|