Skip to content

Commit

Permalink
Move all rspec config to spec_helper
Browse files Browse the repository at this point in the history
Inspired by: https://stackoverflow.com/a/7364289

We can also read more about the config options over here:
https://relishapp.com/rspec/rspec-core/v/3-10/docs/configuration
  • Loading branch information
fbuys committed Oct 19, 2021
1 parent 0b7f964 commit b90b73e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
--color
--profile
--require spec_helper
17 changes: 17 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
RSpec.configure do |config|
# Use color in STDOUT
config.color = true
# Use color not only in STDOUT but also in pagers and files
config.tty = true

# Display 10 slowest tests after a test run
config.profile_examples = true

# Use the specified formatter
# :documentation, :progress, :html, :json, CustomFormatterClass
config.formatter = :progress

# Specify order for spec to be run in
# TODO: make sure all specs pass when set to :rand
# config.order = :rand
end

0 comments on commit b90b73e

Please sign in to comment.