Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
/ rspec-core Public archive
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rspec/rspec-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.8.2
Choose a base ref
...
head repository: rspec/rspec-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.9.0
Choose a head ref

Commits on Aug 4, 2018

  1. Copy the full SHA
    96450f8 View commit details

Commits on Sep 12, 2018

  1. typo

    Remove duplicate word
    Deseao authored Sep 12, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8f3b15c View commit details
  2. Merge pull request #2565 from Deseao/master

    typo
    JonRowe authored Sep 12, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f855006 View commit details

Commits on Sep 19, 2018

  1. Copy the full SHA
    e3443a1 View commit details

Commits on Sep 21, 2018

  1. Merge pull request #2566 from rspec/update-travis-build-scripts-2018-…

    …09-19-for-master
    
    Updates from rspec-dev (2018-09-19)
    JonRowe authored Sep 21, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    73e7870 View commit details

Commits on Oct 3, 2018

  1. Single error when --require'd files fail to load (#2568)

    * Single error when `--require`'d files fail to load
    
    When there's an error loading files specified via the `--require` flag,
    typically `rails_helper.rb` or `spec_helper.rb`, it's very common that
    most of the spec files won't load either since they depend on the helper
    file being loaded. In these situations, one gets hundreds of errors
    printed to the screen. That can be quite intimidating and contributes to
    hide the real culprit, which is the load error in the helper.
    deivid-rodriguez authored and JonRowe committed Oct 3, 2018
    Copy the full SHA
    d730c02 View commit details
  2. Change log for #2568

    JonRowe authored Oct 3, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    28ceaf2 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4f8abda View commit details

Commits on Oct 13, 2018

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    58f3821 View commit details

Commits on Oct 18, 2018

  1. Clarify @tag (cuke style) functionality (#2573)

    With the previous documentation, it was unclear if the passed in tag
    using the `@` (cucumber style tagging) would be ignored similar to doing
    `~tag` (for `--tag @tag`), or if it would "ignore" the `@` when building
    the configuration option (`@tag` changes to `:tag`).
    
    Looking at the implementation in `lib/rspec/core/option_parser.rb`
    confirms that it is the latter, so the wording has been updated to make
    that more clear.
    NickLaMuro authored and JonRowe committed Oct 18, 2018
    Copy the full SHA
    7288702 View commit details

Commits on Oct 19, 2018

  1. Add project metadata to the gemspec (#2574)

    * Add project metadata to the gemspec
    * Use the official rspec.info documentation page
    * Use tagged changelog
    orien authored and JonRowe committed Oct 19, 2018
    Copy the full SHA
    9d1d0d6 View commit details

Commits on Oct 31, 2018

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    e5e4ad7 View commit details

Commits on Nov 13, 2018

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4a952a8 View commit details

Commits on Nov 14, 2018

  1. Copy the full SHA
    cd07682 View commit details

Commits on Nov 15, 2018

  1. Fix minor typo (#2578)

    cbliard authored and JonRowe committed Nov 15, 2018
    Copy the full SHA
    4fba098 View commit details

Commits on Nov 16, 2018

  1. Handle RSpec description with japanese char in CP932 encoded files

    When the user create a test with CP932 encoding and japanese chars RSpec
    fail to properly display characters or crash with the error:
    
    >  Encoding::CompatibilityError: incompatible character encodings: Windows-31J and UTF-8
    
    Fix:
    - #2570
    - https://github.com/rspec/rspec-core/issues/2543
    
    For Ruby 1.8.7
    We are following the same behavior as for rspec-support
    https://github.com/rspec/rspec-support/blob/9940a8656071655b807f772f36101b4d27f1b67d/lib/rspec/support/spec/string_matcher.rb#L8
    benoittgt committed Nov 16, 2018
    Copy the full SHA
    05611c5 View commit details

Commits on Nov 17, 2018

  1. Enforce UTF-8 locale when running tests in appveyor

    chcp 65001 mean Code Page Number and 65001 is UTF-8.
    
    So by doing this change we modify the code page to UTF-8 for the
    commande that follows.
    
    See documentation: https://ss64.com/nt/chcp.html
    See related issue: appveyor/ci#2107
    benoittgt committed Nov 17, 2018
    Copy the full SHA
    0c9f05f View commit details
  2. Copy the full SHA
    8372e5c View commit details
  3. Copy the full SHA
    25f666a View commit details
  4. Merge pull request #2580 from benoittgt/update-travis-build-scripts-2…

    …018-11-17-for-master
    
    Updated travis build scripts (from rspec-dev)
    benoittgt authored Nov 17, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5df0e1e View commit details

Commits on Nov 27, 2018

  1. Merge pull request #2575 from benoittgt/deal_with_encoding_error

    Handle RSpec description with japanese char in CP932 encoded files
    benoittgt authored Nov 27, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6c5628f View commit details
  2. Change log for #2575

    benoittgt committed Nov 27, 2018
    Copy the full SHA
    f506d69 View commit details

Commits on Dec 10, 2018

  1. Fixed warnings: lib/rspec/core/metadata.rb:172: warning: Object#=~ is…

    … deprecated; it always returns nil (#2582)
    walf443 authored and JonRowe committed Dec 10, 2018
    Copy the full SHA
    5e6171e View commit details
  2. Changelog for #2582

    JonRowe authored Dec 10, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    595747f View commit details

Commits on Dec 21, 2018

  1. Updates from rspec-dev (2018-12-21) (#2585)

    * Updated travis build scripts (from rspec-dev)
    
    * Skip broken spec on windows
    JonRowe authored Dec 21, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    726821d View commit details

Commits on Dec 30, 2018

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dc185ab View commit details

Commits on Dec 31, 2018

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fb5aa28 View commit details

Commits on Jan 4, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cc68276 View commit details

Commits on Jan 8, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d598ecb View commit details

Commits on Feb 1, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e4e10d9 View commit details
  2. Changelog for #2593

    JonRowe authored Feb 1, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1a1cc94 View commit details

Commits on Feb 2, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b925766 View commit details

Commits on Feb 4, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cb1b4ce View commit details

Commits on Mar 1, 2019

  1. Add support for --example-matches

    Add support for --example-matches / -E that allows matching examples with regex syntax, fixes #2584
    tansaku authored and JonRowe committed Mar 1, 2019
    Copy the full SHA
    ef17239 View commit details
  2. Change log for #2586

    JonRowe authored Mar 1, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d048c36 View commit details

Commits on Mar 3, 2019

  1. Copy the full SHA
    6453153 View commit details

Commits on Mar 4, 2019

  1. Copy the full SHA
    74ad029 View commit details

Commits on Mar 7, 2019

  1. Did you mean functionality. (#2601)

    * Add did_you_mean functionality to rspec-core.
    
    The functionality provides for suggestions when a person enters an
    rspec spec/some_file_path command with typographical errors.
    
    If there are errors, then the code at lib/rspec/core/configuration.rb:2037
    searches for suggestions. If useful suggestions are found
    they are added to the reported exception at
    lib/rspec/core/configuration.rb:2038.
    
    The suggestions are done by the ::DidYouMean::SpellChecker API
    where available.
    obromios authored and JonRowe committed Mar 7, 2019
    Copy the full SHA
    cbd6d47 View commit details
  2. Changelog for #2601

    JonRowe authored Mar 7, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f17a414 View commit details

Commits on Mar 24, 2019

  1. Update aruba dependency (#2609)

    * Depend on latest Aruba release
    * Aruba has deprecated `in_current_directory` fix that
    * Remove remaining use of in_current_dir
    * Replace use of clean_current_dir with setup_aruba
    * Remove use of deprecated #dirs method
    * Replace #remove_file with #remove
    * Replace #set_env with #set_environment_variable
    * Replace call to #run_simple with #run_command_and_stop
    * Remove custom fail-with-output step
    * Remove custom pass-with-output step
    * DRY up output checks by reintroducing all_output helper
    mvz authored and JonRowe committed Mar 24, 2019
    Copy the full SHA
    0b4c98d View commit details

Commits on Apr 1, 2019

  1. Copy the full SHA
    4a29a4b View commit details

Commits on Apr 18, 2019

  1. Copy the full SHA
    7727a07 View commit details

Commits on May 14, 2019

  1. Add a minimalist formatter (c/quickfix style output) (#2614)

    * Add a minimalisr formatter
    
    This formatter outputs failures in a similar fashion to the C compiler
    — file:line:message — allowing straightforward integration with text
    editors like vim and without adding extra dependencies to the project
    (relying on the quickfix-window from vim or similar feature for other
    editors).
    
    One can configure his editor with the following line (vim) and start
    jumping between failures using the regular editor keybindings, without
    having to visually parse the output from rspec to find out the file and
    line number he want to reach:
    
    ```vim
    autocmd FileType ruby set makeprg=bundle\ exec\ rspec\ --format\ m
    ```
    smortex authored and JonRowe committed May 14, 2019
    4

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    777d85f View commit details
  2. Changelog for #2164

    JonRowe authored May 14, 2019
    3

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    589971d View commit details

Commits on May 15, 2019

  1. Typo: Changelog for #2614

    benoittgt committed May 15, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    benoittgt Benoit Tigeot
    Copy the full SHA
    b5b0967 View commit details

Commits on May 16, 2019

  1. Copy the full SHA
    4b92e78 View commit details
  2. Rename option for FailureList formatter to "failures"

    The name was not matching case statement in formatters.rb and it is much
    simplier to have an argument with that name.
    
    Discussion:
      - https://github.com/rspec/rspec-core/pull/2624/files#r284776400
    benoittgt committed May 16, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    benoittgt Benoit Tigeot
    Copy the full SHA
    63179c7 View commit details
  3. Rename option for FailureList formatter to "failures" (#2625)

    Rename option for FailureList formatter to "failures"
    benoittgt authored May 16, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b4af5c7 View commit details

Commits on May 25, 2019

  1. Fix documentation for nested described_class

    Fixes #2627
    
    Documentation for `described_class` was out of date, a change was made
    in early 3.0 in #1361, but was not reflected to the docs.
    
    Also, documentation for implicit `subject` was off, even though there is
    a feature describing how it behaves.
    pirj committed May 25, 2019
    Copy the full SHA
    861986d View commit details

Commits on May 27, 2019

  1. Merge pull request #2629 from pirj/fix-described_class-in-nested-exam…

    …ples-doc
    
    Fix documentation for nested described_class
    myronmarston authored May 27, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d04d4de View commit details
Showing with 959 additions and 171 deletions.
  1. +1 −1 .rubocop_rspec_base.yml
  2. +8 −8 .travis.yml
  3. +1 −1 BUILD_DETAIL.md
  4. +44 −0 Changelog.md
  5. +25 −4 Gemfile
  6. +15 −15 README.md
  7. +3 −2 appveyor.yml
  8. +1 −1 features/README.md
  9. +131 −0 features/command_line/example_matches_name_option.feature
  10. +2 −2 features/command_line/line_number_appended_to_path.feature
  11. +2 −1 features/command_line/tag.feature
  12. +1 −1 features/example_groups/shared_context.feature
  13. +1 −1 features/formatters/configurable_colors.feature
  14. +3 −0 features/hooks/around_hooks.feature
  15. +3 −0 features/hooks/before_and_after_hooks.feature
  16. +8 −5 features/metadata/described_class.feature
  17. +18 −26 features/step_definitions/additional_cli_steps.rb
  18. +2 −2 features/step_definitions/core_standalone_steps.rb
  19. +3 −2 features/subject/implicit_subject.feature
  20. +4 −4 features/subject/one_liner_syntax.feature
  21. +13 −5 features/support/env.rb
  22. +2 −2 features/support/require_expect_syntax_in_aruba_specs.rb
  23. +1 −0 lib/rspec/core.rb
  24. +1 −1 lib/rspec/core/bisect/server.rb
  25. +56 −9 lib/rspec/core/configuration.rb
  26. +46 −0 lib/rspec/core/did_you_mean.rb
  27. +4 −1 lib/rspec/core/example.rb
  28. +7 −3 lib/rspec/core/example_group.rb
  29. +3 −0 lib/rspec/core/formatters.rb
  30. +35 −3 lib/rspec/core/formatters/documentation_formatter.rb
  31. +12 −1 lib/rspec/core/formatters/exception_presenter.rb
  32. +23 −0 lib/rspec/core/formatters/failure_list_formatter.rb
  33. +14 −6 lib/rspec/core/hooks.rb
  34. +31 −12 lib/rspec/core/memoized_helpers.rb
  35. +2 −3 lib/rspec/core/metadata.rb
  36. +8 −0 lib/rspec/core/option_parser.rb
  37. +21 −1 lib/rspec/core/rake_task.rb
  38. +8 −0 lib/rspec/core/reporter.rb
  39. +5 −0 lib/rspec/core/runner.rb
  40. +1 −1 lib/rspec/core/shared_example_group.rb
  41. +1 −1 lib/rspec/core/version.rb
  42. +1 −1 maintenance-branch
  43. +9 −1 rspec-core.gemspec
  44. +1 −1 script/clone_all_rspec_repos
  45. +2 −2 script/functions.sh
  46. +9 −1 script/predicate_functions.sh
  47. +1 −1 script/run_build
  48. +1 −1 script/travis_functions.sh
  49. +15 −0 script/update_rubygems_and_install_bundler
  50. +3 −3 spec/integration/bisect_runners_spec.rb
  51. +1 −1 spec/integration/fail_if_no_examples_spec.rb
  52. +2 −2 spec/integration/failed_line_detection_spec.rb
  53. +2 −2 spec/integration/filtering_spec.rb
  54. +2 −2 spec/integration/order_spec.rb
  55. +4 −4 spec/integration/output_stream_spec.rb
  56. +2 −2 spec/integration/persistence_failures_spec.rb
  57. +31 −6 spec/integration/spec_file_load_errors_spec.rb
  58. +2 −6 spec/integration/suite_hooks_errors_spec.rb
  59. +117 −0 spec/rspec/core/configuration_spec.rb
  60. +37 −0 spec/rspec/core/did_you_mean_spec.rb
  61. +6 −6 spec/rspec/core/example_spec.rb
  62. +30 −0 spec/rspec/core/formatters/documentation_formatter_spec.rb
  63. +17 −0 spec/rspec/core/formatters/exception_presenter_spec.rb
  64. +19 −0 spec/rspec/core/formatters/failure_list_formatter_spec.rb
  65. +10 −0 spec/rspec/core/option_parser_spec.rb
  66. +1 −1 spec/rspec/core/pending_example_spec.rb
  67. +18 −0 spec/rspec/core/rake_task_spec.rb
  68. +15 −0 spec/rspec/core/reporter_spec.rb
  69. +13 −0 spec/rspec/core/shared_context_spec.rb
  70. +15 −0 spec/rspec/core/shared_example_group_spec.rb
  71. +2 −2 spec/support/aruba_support.rb
  72. +1 −1 spec/support/formatter_support.rb
2 changes: 1 addition & 1 deletion .rubocop_rspec_base.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2018-04-05T18:41:15+10:00 from the rspec-dev repo.
# This file was generated on 2019-07-24T15:33:48+02:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# This file contains defaults for RSpec projects. Individual projects
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file was generated on 2018-04-05T18:41:15+10:00 from the rspec-dev repo.
# This file was generated on 2019-07-24T15:33:48+02:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# In order to install old Rubies, we need to use old Ubuntu distibution.
dist: trusty
language: ruby
sudo: false
email: false
cache:
directories:
- ../bundle
before_install:
- gem update --system # https://github.com/travis-ci/travis-ci/issues/8978#issuecomment-354036443
- gem install bundler
- "script/update_rubygems_and_install_bundler"
- unset _JAVA_OPTIONS
- "script/clone_all_rspec_repos"
bundler_args: "--binstubs --standalone --without documentation --path ../bundle"
@@ -21,9 +21,10 @@ rvm:
- 2.0.0
- 2.1
- 2.2.10
- 2.3.7
- 2.4.4
- 2.5.1
- 2.3.8
- 2.4.6
- 2.5.5
- 2.6.2
- ruby-head
- ree
- rbx-3
@@ -40,7 +41,6 @@ matrix:
- rvm: jruby-head
- rvm: ruby-head
- rvm: rbx-3
- rvm: ruby-2.6.0-preview1
fast_finish: true
branches:
only:
2 changes: 1 addition & 1 deletion BUILD_DETAIL.md
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ The spec suite performs a couple extra checks that are worth noting:
available for use in any context, we want to minimize how many bits of the standard
library we load and use. Otherwise, RSpec's use of part of the standard library could
mask a problem where a gem author forgets to load a part of the standard library they
rely on. The spec suite contains a spec that defines a whitelist of allowed loaded
rely on. The spec suite contains a spec that defines a list of allowed loaded
stdlibs.

In addition, we use [SimpleCov](https://github.com/colszowka/simplecov)
44 changes: 44 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
### 3.9.0 / 2019-10-07
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.8.2...v3.9.0)

Enhancements:
* Improve the handling of errors during loading support files, if a file
errors before loading specs, RSpec will now skip loading the specs.
(David Rodríguez, #2568)
* Add support for --example-matches to run examples by regular expression.
(Sam Joseph, Matt Rider, @okothkongo1, #2586)
* Add `did_you_mean` suggestions for file names encountering a `LoadError`
outside of examples. (@obromios, #2601)
* Add a minimalist quick fix style formatter, only outputs failures as
`file:line:message`. (Romain Tartière, #2614)
* Convert string number values to integer when used for `RSpec::Configuration#fail_fast`
(Viktor Fonic, #2634)
* Issue warning when invalid values are used for `RSpec::Configuration#fail_fast`
(Viktor Fonic, #2634)
* Add support for running the Rake task in a clean environment.
(Jon Rowe, #2632)
* Indent messages by there example group / example in the documentation formatter.
(Samuel Williams, #2649)

### 3.8.2 / 2019-06-29
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.8.1...v3.8.2)

Bug Fixes:

* Fix `config.define_derived_metadata` so that cascades are not triggered
until metadata has been assigned to the example or example group
(Myron Marston, #2635).

### 3.8.1 / 2019-06-13
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.8.0...v3.8.1)

Bug Fixes:

* Handle RSpec description(s) with japanese chars in CP932 encoded files.
(Benoit Tigeot, #2575)
* When defining `let` methods that overwrite an existing method, prevent
a warning being issued by removing the old definition. (Jon Rowe, #2593)
* Prevent warning on Ruby 2.6.0-rc1 (Keiji Yoshimi, #2582)
* Fix `config.define_derived_metadata` so that it supports cascades.
(Myron Marston, #2630).

### 3.8.0 / 2018-08-04
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.7.1...v3.8.0)

29 changes: 25 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -32,14 +32,27 @@ if RUBY_VERSION < '2.0.0' || RUBY_ENGINE == 'java'
gem 'json', '< 2.0.0'
end

if RUBY_VERSION < '2.0.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
gem 'ffi', '< 1.9.15' # allow ffi to be installed on older rubies on windows
elsif RUBY_VERSION < '1.9'
if RUBY_VERSION < '2.2.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
gem 'ffi', '< 1.10'
elsif RUBY_VERSION < '2.0'
gem 'ffi', '< 1.9.19' # ffi dropped Ruby 1.8 support in 1.9.19
else
gem 'ffi', '~> 1.11.0'
end

if RUBY_VERSION < '2.2.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
gem "childprocess", "< 1.0.0"
end

platforms :jruby do
gem "jruby-openssl"
if RUBY_VERSION < '1.9.0'
# Pin jruby-openssl on older J Ruby
gem "jruby-openssl", "< 0.10.0"
# Pin child-process on older J Ruby
gem "childprocess", "< 1.0.0"
else
gem "jruby-openssl"
end
end

gem 'simplecov', '~> 0.8'
@@ -51,4 +64,12 @@ end

gem 'test-unit', '~> 3.0' if RUBY_VERSION.to_f >= 2.2

# Version 5.12 of minitest requires Ruby 2.4
if RUBY_VERSION < '2.4.0'
gem 'minitest', '< 5.12.0'
end


gem 'contracts', '< 0.16' if RUBY_VERSION < '1.9.0'

eval File.read('Gemfile-custom') if File.exist?('Gemfile-custom')
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -19,20 +19,6 @@ RSpec repos as well. Add the following to your `Gemfile`:
end
```

## Contributing

Once you've set up the environment, you'll need to cd into the working
directory of whichever repo you want to work in. From there you can run the
specs and cucumber features, and make patches.

NOTE: You do not need to use rspec-dev to work on a specific RSpec repo. You
can treat each RSpec repo as an independent project.

* [Build details](BUILD_DETAIL.md)
* [Code of Conduct](CODE_OF_CONDUCT.md)
* [Detailed contributing guide](CONTRIBUTING.md)
* [Development setup guide](DEVELOPMENT.md)

## Basic Structure

RSpec uses the words "describe" and "it" so we can express concepts like a conversation:
@@ -67,7 +53,7 @@ context of an _instance_ of that class.

## Nested Groups

You can also declare nested nested groups using the `describe` or `context`
You can also declare nested groups using the `describe` or `context`
methods:

```ruby
@@ -376,6 +362,20 @@ Finished in 0.000379 seconds
1 example, 0 failures
```

## Contributing

Once you've set up the environment, you'll need to cd into the working
directory of whichever repo you want to work in. From there you can run the
specs and cucumber features, and make patches.

NOTE: You do not need to use rspec-dev to work on a specific RSpec repo. You
can treat each RSpec repo as an independent project.

* [Build details](BUILD_DETAIL.md)
* [Code of Conduct](CODE_OF_CONDUCT.md)
* [Detailed contributing guide](CONTRIBUTING.md)
* [Development setup guide](DEVELOPMENT.md)

## Also see

* [https://github.com/rspec/rspec](https://github.com/rspec/rspec)
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2018-04-05T18:41:15+10:00 from the rspec-dev repo.
# This file was generated on 2019-07-24T15:33:48+02:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

version: "{build}"
@@ -33,9 +33,10 @@ test_script:

environment:
matrix:
- ruby_version: 193
- ruby_version: 200
- ruby_version: 21
- ruby_version: 22
- ruby_version: 23-x64
- ruby_version: 24-x64
- ruby_version: 25-x64
- ruby_version: 26-x64
2 changes: 1 addition & 1 deletion features/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rspec-core provides the structure for RSpec code examples:

describe Account do
RSpec.describe Account do
it "has a balance of zero when first opened" do
# example code goes here - for more on the
# code inside the examples, see rspec-expectations
131 changes: 131 additions & 0 deletions features/command_line/example_matches_name_option.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
Feature: `--example-matches` option

Use the `--example-matches` (or `-E`) option to filter examples by name using REGEX.

The argument is matched against the full description of the example, which is
the concatenation of descriptions of the group (including any nested groups)
and the example.

This allows you to run a single uniquely named example, all examples with
similar names, all the examples in a uniquely named group, etc, etc.

You can also use the option more than once to specify multiple example
matches.

Note: description-less examples that have generated descriptions (typical when using the [one-liner syntax](../subject/one-liner-syntax)) cannot be directly filtered with this option, because it is necessary to execute the example to generate the description, so RSpec is unable to use the not-yet-generated description to decide whether or not to execute an example. You can, of course, pass part of a group's description to select all examples defined in the group (including those that have no description).

Background:
Given a file named "first_spec.rb" with:
"""ruby
RSpec.describe "first group" do
it "first" do; end
it "first example in first group" do; end
it "second example in first group" do; end
end
"""
And a file named "second_spec.rb" with:
"""ruby
RSpec.describe "second group" do
it "first example in second group" do; end
it "second example in second group" do; end
end
"""
And a file named "third_spec.rb" with:
"""ruby
RSpec.describe "third group" do
it "first example in third group" do; end
context "group of nest" do
it "first example in nested group" do; end
it "second example in nested group" do; end
it "third example in nested_group with underscore" do; end
end
end
"""
And a file named "fourth_spec.rb" with:
"""ruby
RSpec.describe Array do
describe "#length" do
it "is the number of items" do
expect(Array.new([1,2,3]).length).to eq 3
end
end
end
"""

Scenario: No matches
When I run `rspec . --example-matches nothing_like_this`
Then the process should succeed even though no examples were run

Scenario: Match on one word
When I run `rspec . --example-matches example`
Then the examples should all pass

Scenario: One match in each context
When I run `rspec . --example-matches 'first example'`
Then the examples should all pass

Scenario: One match in one file using just the example name
When I run `rspec . --example-matches 'first example in first group'`
Then the examples should all pass

Scenario: One match in one file using the example name and the group name
When I run `rspec . --example-matches 'first group first example in first group'`
Then the examples should all pass

Scenario: All examples in one group
When I run `rspec . --example-matches 'first group'`
Then the examples should all pass

Scenario: One match in one file with group name
When I run `rspec . --example-matches 'second group first example'`
Then the examples should all pass

Scenario: All examples in one group including examples in nested groups
When I run `rspec . --example-matches 'third group'`
Then the examples should all pass

Scenario: Match using `ClassName#method_name` form
When I run `rspec . --example-matches 'Array#length'`
Then the examples should all pass

Scenario: Match only matching regex
When I run `rspec . --example-matches "first$" --format d`
Then the examples should all pass
And the output should contain all of these:
| first |
And the output should not contain any of these:
| first example in first group |
| second example in first group |
| first example in second group |
| second example in second group |
| first example in third group |
| nested group first example in nested group |
| nested group second example in nested group |

# https://regex101.com/r/RABd8Q/2
Scenario: Match only matching regex with word boundarries
When I run `rspec . --example-matches "nested[^_]" --format d`
Then the examples should all pass
And the output should contain all of these:
| first example in nested group |
| second example in nested group |
And the output should not contain any of these:
| first example in first group |
| second example in first group |
| first example in second group |
| second example in second group |
| first example in third group |
| third example in nested_group |

Scenario: Multiple applications of example name option
When I run `rspec . --example-matches 'first group' --example-matches 'second group' --format d`
Then the examples should all pass
And the output should contain all of these:
| first example in first group |
| second example in first group |
| first example in second group |
| second example in second group |
And the output should not contain any of these:
| first example in third group |
| nested group first example in nested group |
| nested group second example in nested group |
4 changes: 2 additions & 2 deletions features/command_line/line_number_appended_to_path.feature
Original file line number Diff line number Diff line change
@@ -155,5 +155,5 @@ Feature: line number appended to file path
Scenario: Matching one-liners
When I run `rspec one_liner_spec.rb:3 --format doc`
Then the examples should all pass
Then the output should contain "should be > 8"
But the output should not contain "should be < 10"
Then the output should contain "is expected to be > 8"
But the output should not contain "is expected to be < 10"
3 changes: 2 additions & 1 deletion features/command_line/tag.feature
Original file line number Diff line number Diff line change
@@ -17,7 +17,8 @@ Feature: `--tag` option
`:name => 'bar'`.

To be compatible with the Cucumber syntax, tags can optionally start with an
`@` symbol, which will be ignored.
`@` symbol, which will be ignored as part of the tag, e.g. `--tag @focus` is
treated the same as `--tag focus` and is expanded to `:focus => true`.

Background:
Given a file named "tagged_spec.rb" with:
2 changes: 1 addition & 1 deletion features/example_groups/shared_context.feature
Original file line number Diff line number Diff line change
@@ -133,7 +133,7 @@ Feature: shared context
expect(shared_method).to eq("it works")
end
it "inherits metadata form the included context due to the matching metadata", :include_shared => true do |ex|
it "inherits metadata from the included context due to the matching metadata", :include_shared => true do |ex|
expect(ex.metadata).to include(:shared_context => :metadata)
end
end
2 changes: 1 addition & 1 deletion features/formatters/configurable_colors.feature
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ Feature: Configurable colors
Colors are specified as symbols. Options are `:black`, `:red`, `:green`,
`:yellow`, `:blue`, `:magenta`, `:cyan`, and `:white`.

@ansi
@keep-ansi-escape-sequences
Scenario: Customizing the failure color
Given a file named "custom_failure_color_spec.rb" with:
"""ruby
Loading