Skip to content

Commit b973029

Browse files
committed
Add profiled examples to end of rspec run and run specs in random order
1 parent eb9e45b commit b973029

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

spec/spec_helper.rb

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@
4343
add_filter '/public/'
4444
add_filter '/deploy/'
4545
add_filter '/spec/' # for rspec
46+
47+
# Additional coverage groups
48+
add_group 'Policies', 'app/policies'
49+
add_group 'Builders', 'app/builders'
50+
add_group 'Resources', 'app/resource'
51+
add_group 'Robots', 'app/robots'
52+
add_group 'Forms', 'app/forms'
53+
add_group 'Sanitizers', 'app/sanitizers'
54+
add_group 'Notifiers', 'app/notifiers'
4655
end
4756

4857
RSpec.configure do |config|
@@ -86,44 +95,44 @@
8695
# # is tagged with `:focus`, all examples get run. RSpec also provides
8796
# # aliases for `it`, `describe`, and `context` that include `:focus`
8897
# # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
89-
# config.filter_run_when_matching :focus
98+
# # config.filter_run_when_matching :focus
9099
#
91100
# # Allows RSpec to persist some state between runs in order to support
92101
# # the `--only-failures` and `--next-failure` CLI options. We recommend
93102
# # you configure your source control system to ignore this file.
94-
# config.example_status_persistence_file_path = "spec/examples.txt"
103+
# # config.example_status_persistence_file_path = "spec/examples.txt"
95104
#
96105
# # Limits the available syntax to the non-monkey patched syntax that is
97106
# # recommended. For more details, see:
98107
# # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
99108
# # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
100-
# # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
101-
# config.disable_monkey_patching!
109+
# # - http://www.rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
110+
# # config.disable_monkey_patching!
102111
#
103112
# # Many RSpec users commonly either run the entire suite or an individual
104113
# # file, and it's useful to allow more verbose output when running an
105114
# # individual spec file.
106-
# if config.files_to_run.one?
107-
# # Use the documentation formatter for detailed output,
108-
# # unless a formatter has already been configured
109-
# # (e.g. via a command-line flag).
110-
# config.default_formatter = "doc"
111-
# end
115+
# # if config.files_to_run.one?
116+
# # # Use the documentation formatter for detailed output,
117+
# # # unless a formatter has already been configured
118+
# # # (e.g. via a command-line flag).
119+
# # config.default_formatter = "doc"
120+
# # end
112121
#
113122
# # Print the 10 slowest examples and example groups at the
114123
# # end of the spec run, to help surface which specs are running
115124
# # particularly slow.
116-
# config.profile_examples = 10
125+
config.profile_examples = 5
117126
#
118127
# # Run specs in random order to surface order dependencies. If you find an
119128
# # order dependency and want to debug it, you can fix the order by providing
120129
# # the seed, which is printed after each run.
121130
# # --seed 1234
122-
# config.order = :random
131+
config.order = :random
123132
#
124133
# # Seed global randomization in this process using the `--seed` CLI option.
125134
# # Setting this allows you to use `--seed` to deterministically reproduce
126135
# # test failures related to randomization by passing the same `--seed` value
127136
# # as the one that triggered the failure.
128-
# Kernel.srand config.seed
137+
# # Kernel.srand config.seed
129138
end

0 commit comments

Comments
 (0)