To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorexclude_pattern
Use the --exclude-pattern
option to tell RSpec to skip looking for specs in files
that match the pattern specified.
- Background
-
- Given
-
a file named "spec/models/model_spec.rb" with:
RSpec.describe "two specs here" do it "passes" do end it "passes too" do end end
- And
-
a file named "spec/features/feature_spec.rb" with:
RSpec.describe "only one spec" do it "passes" do end end
- Scenarios
-
- By default, RSpec runs files that match `"**/*_spec.rb"`
- The `--exclude-pattern` flag makes RSpec skip matching files
- The `--exclude-pattern` flag can be used to pass in multiple patterns, separated by comma
- The `--exclude-pattern` flag accepts shell style glob unions
- The `--exclude-pattern` flag can be used with the `--pattern` flag
- By default, RSpec runs files that match `"**/*_spec.rb"`
-
- When
-
I run
rspec
- Then
- the output should contain "3 examples, 0 failures"
- The `--exclude-pattern` flag makes RSpec skip matching files
-
- When
-
I run
rspec --exclude-pattern "**/models/*_spec.rb"
- Then
- the output should contain "1 example, 0 failures"
- The `--exclude-pattern` flag can be used to pass in multiple patterns, separated by comma
-
- When
-
I run
rspec --exclude-pattern "**/models/*_spec.rb, **/features/*_spec.rb"
- Then
- the output should contain "0 examples, 0 failures"
- The `--exclude-pattern` flag accepts shell style glob unions
-
- When
-
I run
rspec --exclude-pattern "**/{models,features}/*_spec.rb"
- Then
- the output should contain "0 examples, 0 failures"
- The `--exclude-pattern` flag can be used with the `--pattern` flag
-
- When
-
I run
rspec --pattern "spec/**/*_spec.rb" --exclude-pattern "spec/models/*_spec.rb"
- Then
- the output should contain "1 example, 0 failures"
Last published 4 months ago by Jon Rowe.