Permalink
Browse files

Add descriptive comments to generated spec_helper

  • Loading branch information...
1 parent 45bfe2b commit 3d9c6603370f27d1805c9cebf6deb9aa5b2d5b5a @jasonkarns committed Apr 18, 2013
Showing with 17 additions and 0 deletions.
  1. +17 −0 lib/rspec/core/project_initializer.rb
@@ -48,8 +48,25 @@ def create_spec_helper_file
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
+ # Specify metadata using just symbols. Each symbol used will effectively be
+ # treated as a `true` value, allowing easier filtering when running specs.
+ # it 'can be filtered using simple metadata', :fast, :simple do
+ # end
+ #
+ # rspec -t fast
+ #
config.treat_symbols_as_metadata_keys_with_true_values = true
+
+ # Run all specs when none match the provided filter. This works well in
+ # conjunction with `config.filter_run :focus`, as it will run the entire
+ # suite when no specs have `:filter` metadata.
+ #
# config.run_all_when_everything_filtered = true
+
+ # Limit the spec run to only specs with the focus metadata. If no specs have
+ # the filtering metadata and `run_all_when_everything_filtered = true` then
+ # all specs will run.
+ #
# config.filter_run :focus
# Run specs in random order to surface order dependencies. If you find an

0 comments on commit 3d9c660

Please sign in to comment.