test-prof 0.11.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +109 -446
- data/LICENSE.txt +1 -1
- data/README.md +9 -13
- data/config/default.yml +35 -0
- data/lib/minitest/test_prof_plugin.rb +3 -0
- data/lib/test_prof/before_all.rb +0 -4
- data/lib/test_prof/cops/inject.rb +16 -14
- data/lib/test_prof/cops/rspec/aggregate_examples.rb +2 -2
- data/lib/test_prof/cops/rspec/aggregate_examples/its.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/line_range_helpers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/matchers_with_side_effects.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/metadata_helpers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/node_matchers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_failures.rb +2 -4
- data/lib/test_prof/event_prof/instrumentations/active_support.rb +22 -4
- data/lib/test_prof/ext/active_record_3.rb +1 -1
- data/lib/test_prof/recipes/minitest/sample.rb +6 -10
- data/lib/test_prof/recipes/rspec/before_all.rb +1 -9
- data/lib/test_prof/recipes/rspec/let_it_be.rb +108 -11
- data/lib/test_prof/recipes/rspec/sample.rb +4 -2
- data/lib/test_prof/stack_prof.rb +3 -0
- data/lib/test_prof/version.rb +1 -1
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89c1d2f72a772c731bcb32ee68a21129e82a003a40a194f6a503a31e5b445954
|
4
|
+
data.tar.gz: 6ed48924861ec8523a083ba853bf5de43579df0624f95e003ca6d417c9b4e076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c62484546cda02e28ce819790cb3479004a970dc1c88849eb7ff3e55114b71710774f0dbc2ce7d4874036a5513f10585c3c4d805db05a75c93acb69a36436cb
|
7
|
+
data.tar.gz: 4b6d8438fff041a84975c52428f50a03d9f4519a08a2884a35ae45bb43df4c11fa7f375a041477928a1009610dd0dc96d1e702ba6728eb4a2db8a6e147c3119b
|
data/CHANGELOG.md
CHANGED
@@ -1,510 +1,169 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
-
## master (
|
3
|
+
## master (unrealeased)
|
4
4
|
|
5
|
-
## 0.
|
6
|
-
|
7
|
-
- Fix `let_it_be` issue when initialized with an array/enumerable or an AR relation. ([@pirj][])
|
8
|
-
|
9
|
-
- Improve `RSpec/AggregateExamples` (formerly `RSpec/AggregateFailures`) cop. ([@pirj][])
|
10
|
-
|
11
|
-
## 0.10.2 (2020-01-07) 🎄
|
12
|
-
|
13
|
-
- Fix Ruby 2.7 deprecations. ([@lostie][])
|
14
|
-
|
15
|
-
## 0.10.1 (2019-10-17)
|
16
|
-
|
17
|
-
- Fix AnyFixture DSL when using with Rails 6.1+. ([@palkan][])
|
18
|
-
|
19
|
-
- Fix loading `let_it_be` without ActiveRecord present. ([@palkan][])
|
20
|
-
|
21
|
-
- Fix compatibility of `before_all` with [`isolator`](https://github.com/palkan/isolator) gem to handle correct usages of non-atomic interactions outside DB transactions. ([@Envek][])
|
22
|
-
|
23
|
-
- Updates FactoryProf to show the amount of time taken per factory call. ([@tyleriguchi][])
|
24
|
-
|
25
|
-
## 0.10.0 (2019-08-19)
|
26
|
-
|
27
|
-
- Use RSpec example ID instead of full description for RubyProf/Stackprof report names. ([@palkan][])
|
28
|
-
|
29
|
-
For more complex scenarios feel free to use your own report name generator:
|
30
|
-
|
31
|
-
```ruby
|
32
|
-
# for RubyProf
|
33
|
-
TestProf::RubyProf::Listener.report_name_generator = ->(example) { "..." }
|
34
|
-
# for Stackprof
|
35
|
-
TestProf::StackProf::Listener.report_name_generator = ->(example) { "..." }
|
36
|
-
```
|
37
|
-
|
38
|
-
- Support arrays in `let_it_be` with modifiers. ([@palkan][])
|
39
|
-
|
40
|
-
```ruby
|
41
|
-
# Now you can use modifiers with arrays
|
42
|
-
let_it_be(:posts, reload: true) { create_pair(:post) }
|
43
|
-
```
|
44
|
-
|
45
|
-
- Refactor `let_it_be` modifiers and allow adding custom modifiers. ([@palkan][])
|
46
|
-
|
47
|
-
```ruby
|
48
|
-
TestProf::LetItBe.config.register_modifier :reload do |record, val|
|
49
|
-
# ignore when `reload: false`
|
50
|
-
next record unless val
|
51
|
-
# ignore non-ActiveRecord objects
|
52
|
-
next record unless record.is_a?(::ActiveRecord::Base)
|
53
|
-
record.reload
|
54
|
-
end
|
55
|
-
```
|
56
|
-
|
57
|
-
- Print warning when `ActiveRecordSharedConnection` is used in the version of Rails
|
58
|
-
supporting `lock_threads` (5.1+). ([@palkan][])
|
59
|
-
|
60
|
-
## 0.9.0 (2019-05-14)
|
61
|
-
|
62
|
-
- Add threshold and custom event support to FactoryDoctor. ([@palkan][])
|
63
|
-
|
64
|
-
```sh
|
65
|
-
$ FDOC=1 FDOC_EVENT="sql.rom" FDOC_THRESHOLD=0.1 rspec
|
66
|
-
```
|
67
|
-
|
68
|
-
- Add Fabrication support to FactoryDoctor. ([@palkan][])
|
69
|
-
|
70
|
-
- Add `guard` and `top_level` options to `EventProf::Monitor`. ([@palkan][])
|
71
|
-
|
72
|
-
For example:
|
73
|
-
|
74
|
-
```ruby
|
75
|
-
TestProf::EventProf.monitor(
|
76
|
-
Sidekiq::Client,
|
77
|
-
"sidekiq.inline",
|
78
|
-
:raw_push,
|
79
|
-
top_level: true,
|
80
|
-
guard: ->(*) { Sidekiq::Testing.inline? }
|
81
|
-
)
|
82
|
-
```
|
83
|
-
|
84
|
-
- Add global `before_all` hooks. ([@danielwaterworth][], [@palkan][])
|
85
|
-
|
86
|
-
Now you can run additional code before and after every `before_all` transaction
|
87
|
-
begins and rollbacks:
|
88
|
-
|
89
|
-
```ruby
|
90
|
-
TestProf::BeforeAll.configure do |config|
|
91
|
-
config.before(:begin) do
|
92
|
-
# do something before transaction opens
|
93
|
-
end
|
5
|
+
## 0.12.1 (2020-09-01)
|
94
6
|
|
95
|
-
|
96
|
-
# do something after transaction closes
|
97
|
-
end
|
98
|
-
end
|
99
|
-
```
|
100
|
-
|
101
|
-
- Add ability to use `let_it_be` aliases with predefined options. ([@danielwaterworth][])
|
102
|
-
|
103
|
-
```ruby
|
104
|
-
TestProf::LetItBe.configure do |config|
|
105
|
-
config.alias_to :let_it_be_with_refind, refind: true
|
106
|
-
end
|
107
|
-
```
|
108
|
-
|
109
|
-
- Made FactoryProf measure and report on timing ([@danielwaterworth][])
|
7
|
+
- Minor improvements.
|
110
8
|
|
111
|
-
## 0.
|
9
|
+
## 0.12.0 (2020-07-17)
|
112
10
|
|
113
|
-
-
|
11
|
+
- Add state leakage detection for `let_it_be`. ([@pirj][], [@jaimerson][], [@alexvko][])
|
114
12
|
|
115
|
-
-
|
13
|
+
- Add default let_it_be modifiers configuration. ([@palkan][])
|
116
14
|
|
117
|
-
|
15
|
+
You can configure global modifiers:
|
118
16
|
|
119
|
-
|
17
|
+
```ruby
|
18
|
+
TestProf::LetItBe.configure do |config|
|
19
|
+
# Make refind activated by default
|
20
|
+
config.default_modifiers[:refind] = true
|
21
|
+
end
|
22
|
+
```
|
120
23
|
|
121
|
-
|
24
|
+
Or for specific contexts via tags:
|
122
25
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
26
|
+
```ruby
|
27
|
+
context "with let_it_be reload", let_it_be_modifiers: {reload: true} do
|
28
|
+
# examples
|
29
|
+
end
|
30
|
+
```
|
128
31
|
|
129
|
-
|
32
|
+
- **Drop Ruby 2.4 support.** ([@palkan][])
|
130
33
|
|
131
|
-
-
|
34
|
+
- SAMPLE and SAMPLE_GROUP work consistently with seed in RSpec and Minitest. ([@stefkin][])
|
132
35
|
|
133
|
-
|
36
|
+
- Make sure EventProf is not affected by time freezing. ([@palkan][])
|
134
37
|
|
135
|
-
|
38
|
+
EventProf results now is not affected by `Timecop.freeze` or similar.
|
136
39
|
|
137
|
-
|
40
|
+
See more in [#181](https://github.com/test-prof/test-prof/issues/181).
|
138
41
|
|
139
|
-
-
|
42
|
+
- Adds the ability to define stackprof's interval sampling by using `TEST_STACK_PROF_INTERVAL` env variable ([@LynxEyes][])
|
140
43
|
|
141
|
-
|
44
|
+
Now you can use `$ TEST_STACK_PROF=1 TEST_STACK_PROF_INTERVAL=10000 rspec` to define a custom interval (in microseconds).
|
142
45
|
|
143
|
-
|
46
|
+
## 0.11.3 (2020-02-11)
|
144
47
|
|
145
|
-
-
|
48
|
+
- Disable `RSpec/AggregateFailures` by default. ([@pirj][])
|
146
49
|
|
147
|
-
|
148
|
-
$ SAMPLE=10 rake test # runs 10 random test examples
|
149
|
-
$ SAMPLE_GROUPS=10 rake test # runs 10 random example groups
|
150
|
-
```
|
50
|
+
## 0.11.2 (2020-02-11)
|
151
51
|
|
152
|
-
-
|
52
|
+
- Fix RuboCop integration regressions. ([@palkan][])
|
153
53
|
|
154
|
-
## 0.
|
54
|
+
## 0.11.1 (2020-02-10)
|
155
55
|
|
156
|
-
- Add `
|
56
|
+
- Add `config/` to the gem contents. ([@palkan][])
|
157
57
|
|
158
|
-
|
58
|
+
Fixes RuboCop integration regression from 0.11.0.
|
159
59
|
|
160
|
-
|
161
|
-
|
162
|
-
Example:
|
60
|
+
## 0.11.0 (2020-02-09)
|
163
61
|
|
164
|
-
|
165
|
-
# Do not use shared connection for sqlite db
|
166
|
-
TestProf::ActiveRecordSharedConnection.ignore { |config| config[:adapter] == "sqlite3" }
|
167
|
-
```
|
62
|
+
- Fix `let_it_be` issue when initialized with an array/enumerable or an AR relation. ([@pirj][])
|
168
63
|
|
169
|
-
|
64
|
+
- Improve `RSpec/AggregateExamples` (formerly `RSpec/AggregateFailures`) cop. ([@pirj][])
|
170
65
|
|
171
|
-
|
66
|
+
## 0.10.2 (2020-01-07) 🎄
|
172
67
|
|
173
|
-
|
68
|
+
- Fix Ruby 2.7 deprecations. ([@lostie][])
|
174
69
|
|
175
|
-
|
70
|
+
## 0.10.1 (2019-10-17)
|
176
71
|
|
177
|
-
|
72
|
+
- Fix AnyFixture DSL when using with Rails 6.1+. ([@palkan][])
|
178
73
|
|
179
|
-
|
74
|
+
- Fix loading `let_it_be` without ActiveRecord present. ([@palkan][])
|
180
75
|
|
181
|
-
|
76
|
+
- Fix compatibility of `before_all` with [`isolator`](https://github.com/palkan/isolator) gem to handle correct usages of non-atomic interactions outside DB transactions. ([@Envek][])
|
182
77
|
|
183
|
-
|
184
|
-
TestProf::RubyProf.configure do |config|
|
185
|
-
config.custom_exclusions = {User => %i[save save!]}
|
186
|
-
end
|
187
|
-
```
|
78
|
+
- Updates FactoryProf to show the amount of time taken per factory call. ([@tyleriguchi][])
|
188
79
|
|
189
|
-
## 0.
|
80
|
+
## 0.10.0 (2019-08-19)
|
190
81
|
|
191
|
-
|
82
|
+
- Use RSpec example ID instead of full description for RubyProf/Stackprof report names. ([@palkan][])
|
192
83
|
|
193
|
-
|
84
|
+
For more complex scenarios feel free to use your own report name generator:
|
194
85
|
|
195
|
-
|
86
|
+
```ruby
|
87
|
+
# for RubyProf
|
88
|
+
TestProf::RubyProf::Listener.report_name_generator = ->(example) { "..." }
|
89
|
+
# for Stackprof
|
90
|
+
TestProf::StackProf::Listener.report_name_generator = ->(example) { "..." }
|
91
|
+
```
|
196
92
|
|
197
|
-
|
198
|
-
class Work
|
199
|
-
def do
|
200
|
-
# ...
|
201
|
-
end
|
202
|
-
end
|
93
|
+
- Support arrays in `let_it_be` with modifiers. ([@palkan][])
|
203
94
|
|
204
|
-
|
205
|
-
|
206
|
-
|
95
|
+
```ruby
|
96
|
+
# Now you can use modifiers with arrays
|
97
|
+
let_it_be(:posts, reload: true) { create_pair(:post) }
|
98
|
+
```
|
207
99
|
|
208
|
-
[
|
100
|
+
- Refactor `let_it_be` modifiers and allow adding custom modifiers. ([@palkan][])
|
209
101
|
|
210
|
-
|
102
|
+
```ruby
|
103
|
+
TestProf::LetItBe.config.register_modifier :reload do |record, val|
|
104
|
+
# ignore when `reload: false`
|
105
|
+
next record unless val
|
106
|
+
# ignore non-ActiveRecord objects
|
107
|
+
next record unless record.is_a?(::ActiveRecord::Base)
|
108
|
+
record.reload
|
109
|
+
end
|
110
|
+
```
|
211
111
|
|
212
|
-
|
112
|
+
- Print warning when `ActiveRecordSharedConnection` is used in the version of Rails
|
113
|
+
supporting `lock_threads` (5.1+). ([@palkan][])
|
213
114
|
|
214
|
-
|
115
|
+
## 0.9.0 (2019-05-14)
|
215
116
|
|
216
|
-
- Add
|
117
|
+
- Add threshold and custom event support to FactoryDoctor. ([@palkan][])
|
217
118
|
|
218
|
-
|
119
|
+
```sh
|
120
|
+
$ FDOC=1 FDOC_EVENT="sql.rom" FDOC_THRESHOLD=0.1 rspec
|
121
|
+
```
|
219
122
|
|
220
|
-
|
123
|
+
- Add Fabrication support to FactoryDoctor. ([@palkan][])
|
221
124
|
|
222
|
-
-
|
125
|
+
- Add `guard` and `top_level` options to `EventProf::Monitor`. ([@palkan][])
|
223
126
|
|
224
|
-
|
127
|
+
For example:
|
225
128
|
|
226
|
-
|
227
|
-
|
129
|
+
```ruby
|
130
|
+
TestProf::EventProf.monitor(
|
131
|
+
Sidekiq::Client,
|
132
|
+
"sidekiq.inline",
|
133
|
+
:raw_push,
|
134
|
+
top_level: true,
|
135
|
+
guard: ->(*) { Sidekiq::Testing.inline? }
|
136
|
+
)
|
137
|
+
```
|
228
138
|
|
229
|
-
|
230
|
-
↳ user – 3
|
231
|
-
↳ funnel – 2
|
232
|
-
ApplicantsController (./spec/controllers/applicants_controller_spec.rb:3) – 00:33.252 of 00:41.407 (222)
|
233
|
-
↳ user – 10
|
234
|
-
↳ funnel – 5
|
235
|
-
```
|
139
|
+
- Add global `before_all` hooks. ([@danielwaterworth][], [@palkan][])
|
236
140
|
|
237
|
-
|
141
|
+
Now you can run additional code before and after every `before_all` transaction
|
142
|
+
begins and rollbacks:
|
238
143
|
|
239
|
-
|
240
|
-
|
241
|
-
|
144
|
+
```ruby
|
145
|
+
TestProf::BeforeAll.configure do |config|
|
146
|
+
config.before(:begin) do
|
147
|
+
# do something before transaction opens
|
242
148
|
end
|
243
|
-
```
|
244
|
-
|
245
|
-
- [Fix [#80](https://github.com/palkan/test-prof/issues/80)] Added ability to preserve traits. ([@Vasfed][])
|
246
|
-
|
247
|
-
Disabled by default for compatibility. Enable globally by `FactoryDefault.preserve_traits = true` or for single `create_default`: `create_default(:user, preserve_traits: true)`
|
248
|
-
|
249
|
-
When enabled - default object will be used only when there's no [traits](https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#traits) in association.
|
250
|
-
|
251
|
-
- Add ability to run only `let` or `before` profiler with RSpecDissect. ([@palkan][])
|
252
|
-
|
253
|
-
- Collect _raw_ data with StackProf by default. ([@palkan][])
|
254
|
-
|
255
|
-
- Refactor `:with_clean_fixture` to clean data once per group. ([@palkan][])
|
256
|
-
|
257
|
-
- [Fix [#75](https://github.com/palkan/test-prof/issues/75)] Fix `RSpec/Aggregate` failures with non-regular examples. ([@palkan][])
|
258
149
|
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
## 0.5.0 (2018-04-25)
|
263
|
-
|
264
|
-
### Features
|
265
|
-
|
266
|
-
- Add events support to TagProf. ([@palkan][])
|
267
|
-
|
268
|
-
Example usage:
|
269
|
-
|
270
|
-
```sh
|
271
|
-
TAG_PROF=type TAG_PROF_EVENT=sql.active_record rspec
|
272
|
-
```
|
273
|
-
|
274
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/tag_prof?id=profiling-events)
|
275
|
-
|
276
|
-
- Add logging helpers for Rails. ([@palkan][])
|
277
|
-
|
278
|
-
Enable verbose logging globally:
|
279
|
-
|
280
|
-
```sh
|
281
|
-
LOG=all rspec
|
282
|
-
```
|
283
|
-
|
284
|
-
Or per example (group):
|
285
|
-
|
286
|
-
```ruby
|
287
|
-
it "does smth weird", :log do
|
288
|
-
# ...
|
150
|
+
config.after(:rollback) do
|
151
|
+
# do something after transaction closes
|
289
152
|
end
|
290
|
-
|
291
|
-
|
292
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/logging)
|
153
|
+
end
|
154
|
+
```
|
293
155
|
|
294
|
-
- Add
|
295
|
-
|
296
|
-
Generate HTML report by setting `TAG_PROF_FORMAT` to `html`.
|
297
|
-
|
298
|
-
- Add ability to track multiple events at the same time with `EventProf`. ([@palkan][])
|
299
|
-
|
300
|
-
- Add `AnyFixture` DSL. ([@palkan][])
|
301
|
-
|
302
|
-
Example:
|
303
|
-
|
304
|
-
```ruby
|
305
|
-
# Enable DSL
|
306
|
-
using TestProf::AnyFixture::DSL
|
307
|
-
|
308
|
-
# and then you can use `fixture` method (which is just an alias for `TestProf::AnyFixture.register`)
|
309
|
-
before(:all) { fixture(:account) }
|
310
|
-
|
311
|
-
# You can also use it to fetch the record (instead of storing it in instance variable)
|
312
|
-
let(:account) { fixture(:account) }
|
313
|
-
```
|
314
|
-
|
315
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=dsl)
|
316
|
-
|
317
|
-
- Add `AnyFixture` usage report. ([@palkan][])
|
318
|
-
|
319
|
-
Enable `AnyFixture` usage reporting with `ANYFIXTURE_REPORTING=1` or with:
|
320
|
-
|
321
|
-
```ruby
|
322
|
-
TestProf::AnyFixture.reporting_enabled = true
|
323
|
-
```
|
324
|
-
|
325
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=usage-report)
|
326
|
-
|
327
|
-
- Add `ActiveRecordSharedConnection` recipe. ([@palkan][])
|
328
|
-
|
329
|
-
Force ActiveRecord to use the same connection between threads (to avoid database cleaning in browser tests).
|
330
|
-
|
331
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/active_record_shared_connection)
|
332
|
-
|
333
|
-
- [#70](https://github.com/palkan/test-prof/pull/70) Add `FactoryAllStub` recipe. ([@palkan][])
|
334
|
-
|
335
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/factory_all_stub)
|
336
|
-
|
337
|
-
- Add `ActiveRecordRefind` refinement. ([@palkan][])
|
338
|
-
|
339
|
-
[📝 Docs](https://test-prof.evilmartians.io/#/any_fixture?id=activerecordrefind)
|
340
|
-
|
341
|
-
### Fixes & Improvements
|
342
|
-
|
343
|
-
- **Brand new documentatation website: https://test-prof.evilmartians.io/**
|
344
|
-
|
345
|
-
- Disable referential integrity when cleaning AnyFixture. ([@palkan][])
|
346
|
-
|
347
|
-
|
348
|
-
## 0.4.9 (2018-03-20)
|
349
|
-
|
350
|
-
- [Fix [#64](https://github.com/palkan/test-prof/issues/64)] Fix dependencies requiring for FactoryDefault. ([@palkan][])
|
351
|
-
|
352
|
-
- [Fix [#60](https://github.com/palkan/test-prof/issues/60)] Fix RSpecDissect reporter hooks. ([@palkan][])
|
353
|
-
|
354
|
-
Consider only `example_failed` and `example_passed` to ensure that the `run_time`
|
355
|
-
is available.
|
356
|
-
|
357
|
-
## 0.4.8 (2018-01-17)
|
358
|
-
|
359
|
-
- Add `minitest` 5.11 support. ([@palkan][])
|
360
|
-
|
361
|
-
- Fix `spring` detection. ([@palkan][])
|
362
|
-
|
363
|
-
Some `spring`-related gems do not check whether Spring is running and load
|
364
|
-
Spring modules. Thus we have `Spring` defined (and even `Spring.after_fork` defined) but no-op.
|
365
|
-
|
366
|
-
Now we require that `Spring::Applcation` is defined in order to rely on Spring.
|
367
|
-
|
368
|
-
Possibly fixes [#47](https://github.com/palkan/test-prof/issues/47).
|
369
|
-
|
370
|
-
## 0.4.7 (2017-12-25)
|
371
|
-
|
372
|
-
- [#57](https://github.com/palkan/test-prof/pull/57) Fix RubyProf Printers Support ([@rabotyaga][])
|
373
|
-
|
374
|
-
## 0.4.6 (2017-12-17)
|
375
|
-
|
376
|
-
- Upgrade RSpec/AggregateFailures to RuboCop 0.52.0. ([@palkan][])
|
377
|
-
|
378
|
-
RuboCop < 0.51.0 is not supported anymore.
|
379
|
-
|
380
|
-
- [Fixes [#49](https://github.com/palkan/test-prof/issues/49)] Correctly detect RSpec version in `let_it_be`. ([@desoleary][])
|
381
|
-
|
382
|
-
## 0.4.5 (2017-12-09)
|
383
|
-
|
384
|
-
- Fix circular require in `lib/factory_doctor/minitest`. ([@palkan][])
|
385
|
-
|
386
|
-
## 0.4.4 (2017-11-08)
|
387
|
-
|
388
|
-
- [Fixes [#48](https://github.com/palkan/test-prof/issues/48)] Respect RubyProf reports files extensions. ([@palkan][])
|
389
|
-
|
390
|
-
## 0.4.3 (2017-10-26)
|
391
|
-
|
392
|
-
- [#46](https://github.com/palkan/test-prof/pull/46) Support FactoryBot, which is [former FactoryGirl](https://github.com/thoughtbot/factory_bot/pull/1051),
|
393
|
-
while maintaining compatibility with latter. ([@Shkrt][])
|
394
|
-
|
395
|
-
## 0.4.2 (2017-10-23)
|
396
|
-
|
397
|
-
- Fix bug with multiple `before_all` within one group. ([@palkan][])
|
398
|
-
|
399
|
-
## 0.4.1 (2017-10-18)
|
400
|
-
|
401
|
-
- [#44](https://github.com/palkan/test-prof/pull/44) Support older versions of RSpec. ([@palkan][])
|
402
|
-
|
403
|
-
Support RSpec 3.1.0+ in general.
|
404
|
-
|
405
|
-
`let_it_be` supports only RSpec 3.3.0+.
|
406
|
-
|
407
|
-
RSpecDissect `let` tracking supports only RSpec 3.3.0+.
|
408
|
-
|
409
|
-
- [#38](https://github.com/palkan/test-prof/pull/38) Factory Doctor Minitest integration. ([@IDolgirev][])
|
410
|
-
|
411
|
-
It is possible now to use Factory Doctor with Minitest
|
412
|
-
|
413
|
-
## 0.4.0 (2017-10-03)
|
414
|
-
|
415
|
-
### Features:
|
416
|
-
|
417
|
-
- [#29](https://github.com/palkan/test-prof/pull/29) EventProf Minitest integration. ([@IDolgirev][])
|
418
|
-
|
419
|
-
It is possible now to use Event Prof with Minitest
|
420
|
-
|
421
|
-
- [#30](https://github.com/palkan/test-prof/pull/30) Fabrication support for FactoryProf. ([@Shkrt][])
|
422
|
-
|
423
|
-
FactoryProf now also accounts objects created by Fabrication gem (in addition to FactoryGirl)
|
424
|
-
|
425
|
-
## 0.3.0 (2017-09-21)
|
426
|
-
|
427
|
-
### Features:
|
428
|
-
|
429
|
-
- Combine RSpecStamp with FactoryDoctor. ([@palkan][])
|
430
|
-
|
431
|
-
Automatically mark _bad_ examples with custom tags.
|
432
|
-
|
433
|
-
- [#17](https://github.com/palkan/test-prof/pull/17) Combine RSpecStamp with EventProf and RSpecDissect. ([@palkan][])
|
434
|
-
|
435
|
-
It is possible now to automatically mark _slow_ examples and groups with custom tags. For example:
|
436
|
-
|
437
|
-
```sh
|
438
|
-
$ EVENT_PROF="sql.active_record" EVENT_PROF_STAMP="slow:sql" rspec ...
|
439
|
-
```
|
440
|
-
|
441
|
-
After running the command above the top 5 slowest example groups would be marked with `slow: :sql` tag.
|
442
|
-
|
443
|
-
- [#14](https://github.com/palkan/test-prof/pull/14) RSpecDissect profiler. ([@palkan][])
|
444
|
-
|
445
|
-
RSpecDissect tracks how much time do you spend in `before` hooks and memoization helpers (i.e. `let`) in your tests.
|
446
|
-
|
447
|
-
- [#13](https://github.com/palkan/test-prof/pull/13) RSpec `let_it_be` method. ([@palkan][])
|
448
|
-
|
449
|
-
Just like `let`, but persist the result for the whole group (i.e. `let` + `before_all`).
|
450
|
-
|
451
|
-
### Improvements:
|
452
|
-
|
453
|
-
- Add ability to specify RubyProf report through `TEST_RUBY_PROF` env variable. ([@palkan][])
|
454
|
-
|
455
|
-
- Add ability to specify StackProf raw mode through `TEST_STACK_PROF` env variable. ([@palkan][])
|
456
|
-
|
457
|
-
### Changes
|
458
|
-
|
459
|
-
- Use RubyProf `FlatPrinter` by default (was `CallStackPrinter`). ([@palkan][])
|
460
|
-
|
461
|
-
## 0.2.5 (2017-08-30)
|
462
|
-
|
463
|
-
- [#16](https://github.com/palkan/test-prof/pull/16) Support Ruby >= 2.2.0 (was >= 2.3.0). ([@palkan][])
|
464
|
-
|
465
|
-
## 0.2.4 (2017-08-29)
|
466
|
-
|
467
|
-
- EventProf: Fix regression bug with examples profiling. ([@palkan][])
|
468
|
-
|
469
|
-
There was a bug when an event occurs before the example has started (e.g. in `before(:context)` hook).
|
470
|
-
|
471
|
-
## 0.2.3 (2017-08-28)
|
472
|
-
|
473
|
-
- Minor improvements. ([@palkan][])
|
474
|
-
|
475
|
-
## 0.2.2 (2017-08-23)
|
476
|
-
|
477
|
-
- Fix time calculation when Time class is monkey-patched. ([@palkan][])
|
478
|
-
|
479
|
-
Add `TestProf.now` method which is just a copy of original `Time.now` and use it everywhere.
|
480
|
-
|
481
|
-
Fixes [#10](https://github.com/palkan/test-prof/issues/10).
|
482
|
-
|
483
|
-
## 0.2.1 (2017-08-19)
|
484
|
-
|
485
|
-
- Detect `RSpec` by checking the presence of `RSpec::Core`. ([@palkan][])
|
486
|
-
|
487
|
-
Fixes [#8](https://github.com/palkan/test-prof/issues/8).
|
488
|
-
|
489
|
-
## 0.2.0 (2017-08-18)
|
490
|
-
|
491
|
-
- Ensure output directory exists. ([@danielwestendorf][])
|
492
|
-
|
493
|
-
**Change default output dir** to "tmp/test_prof".
|
494
|
-
|
495
|
-
Rename `#artefact_path` to `#artifact_path` to be more US-like
|
496
|
-
|
497
|
-
Ensure output dir exists in `#artifact_path` method.
|
498
|
-
|
499
|
-
- FactoryDoctor: print success message when no bad examples found. ([@palkan][])
|
500
|
-
|
501
|
-
## 0.1.1 (2017-08-17)
|
156
|
+
- Add ability to use `let_it_be` aliases with predefined options. ([@danielwaterworth][])
|
502
157
|
|
503
|
-
|
158
|
+
```ruby
|
159
|
+
TestProf::LetItBe.configure do |config|
|
160
|
+
config.alias_to :let_it_be_with_refind, refind: true
|
161
|
+
end
|
162
|
+
```
|
504
163
|
|
505
|
-
|
164
|
+
- Made FactoryProf measure and report on timing ([@danielwaterworth][])
|
506
165
|
|
507
|
-
-
|
166
|
+
See [changelog](https://github.com/test-prof/test-prof/blob/v0.8.0/CHANGELOG.md) for versions <0.9.0.
|
508
167
|
|
509
168
|
[@palkan]: https://github.com/palkan
|
510
169
|
[@marshall-lee]: https://github.com/marshall-lee
|
@@ -522,3 +181,7 @@ Fixes [#10](https://github.com/palkan/test-prof/issues/10).
|
|
522
181
|
[@tyleriguchi]: https://github.com/tyleriguchi
|
523
182
|
[@lostie]: https://github.com/lostie
|
524
183
|
[@pirj]: https://github.com/pirj
|
184
|
+
[@LynxEyes]: https://github.com/LynxEyes
|
185
|
+
[@stefkin]: https://github.com/stefkin
|
186
|
+
[@jaimerson]: https://github.com/jaimerson
|
187
|
+
[@alexvko]: https://github.com/alexvko
|