diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e98fe99c1f..b71fe7ac22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo. +# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. name: RSpec CI @@ -50,11 +50,12 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - bundler: ${{ matrix.bundler || 2 }} + bundler: ${{ matrix.bundler || '2.2.22' }} ruby-version: ${{ matrix.ruby }} - run: script/update_rubygems_and_install_bundler - run: script/clone_all_rspec_repos - - run: bundle install --binstubs --standalone + - run: bundle install --standalone + - run: bundle binstubs --all - run: script/run_build windows: @@ -73,7 +74,7 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - bundler: 2 + bundler: '2.2.22' ruby-version: ${{ matrix.ruby }} bundler-cache: true - run: cinst ansicon diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index f88c5f23f2..2020daee60 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo. +# This file was generated on 2021-07-13T11:08:51+01: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 diff --git a/Gemfile b/Gemfile index 246b4032ae..2ec578ebc8 100644 --- a/Gemfile +++ b/Gemfile @@ -20,8 +20,7 @@ group :documentation do gem 'github-markup', :platform => :mri end -# Until 1.13.2 is released due to Rubygems usage -gem 'ffi', '~> 1.12.0' +gem 'ffi', '~> 1.15.0' gem "jruby-openssl", platforms: :jruby diff --git a/script/ci_functions.sh b/script/ci_functions.sh index 0c938e3935..1c0785e18a 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo. +# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # Taken from: diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index 39918a6dcf..0478bcef87 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo. +# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/functions.sh b/script/functions.sh index c2e06067d5..085923dbc4 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo. +# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -139,10 +139,7 @@ function check_binstubs { echo " $ bundle binstubs$gems" echo echo " # To binstub all gems" - echo " $ bundle install --binstubs" - echo - echo " # To binstub all gems and avoid loading bundler" - echo " $ bundle install --binstubs --standalone" + echo " $ bundle binstubs --all" fi return $success diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index 016a09804b..7234d8b078 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo. +# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. function is_mri { @@ -129,9 +129,13 @@ function documentation_enforced { } function style_and_lint_enforced { - if [ -x ./bin/rubocop ]; then - return 0 - else + if is_ruby_head; then return 1 + else + if [ -x ./bin/rubocop ]; then + return 0 + else + return 1 + fi fi } diff --git a/script/run_build b/script/run_build index af5a1a702a..eaeff20016 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo. +# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e @@ -30,6 +30,7 @@ fi if supports_cross_build_checks; then fold "one-by-one specs" run_specs_one_by_one + export NO_COVERAGE=true run_all_spec_suites else echo "Skipping the rest of the build on non-MRI rubies" diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index 960d3531a2..5634ce2326 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,13 +1,13 @@ #!/bin/bash -# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo. +# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e source script/functions.sh if is_ruby_23_plus; then - yes | gem update --system - yes | gem install bundler + yes | gem update --system '3.2.22' + yes | gem install bundler -v '2.2.22' else echo "Warning installing older versions of Rubygems / Bundler" gem update --system '2.7.8' diff --git a/spec/integration/spec_file_load_errors_spec.rb b/spec/integration/spec_file_load_errors_spec.rb index d4876ef4dd..2faa0e8bd6 100644 --- a/spec/integration/spec_file_load_errors_spec.rb +++ b/spec/integration/spec_file_load_errors_spec.rb @@ -19,6 +19,7 @@ RSpec.configure do |c| c.filter_gems_from_backtrace "gems/aruba" + c.filter_gems_from_backtrace "gems/bundler" c.backtrace_exclusion_patterns << %r{/rspec-core/spec/} << %r{rspec_with_simplecov} c.failure_exit_code = failure_exit_code c.error_exit_code = error_exit_code diff --git a/spec/integration/suite_hooks_errors_spec.rb b/spec/integration/suite_hooks_errors_spec.rb index cfc0ad6f15..19854f0cf0 100644 --- a/spec/integration/suite_hooks_errors_spec.rb +++ b/spec/integration/suite_hooks_errors_spec.rb @@ -21,6 +21,7 @@ RSpec.configure do |c| c.filter_gems_from_backtrace "gems/aruba" + c.filter_gems_from_backtrace "gems/bundler" c.backtrace_exclusion_patterns << %r{/rspec-core/spec/} << %r{rspec_with_simplecov} c.failure_exit_code = failure_exit_code c.error_exit_code = error_exit_code diff --git a/spec/rspec/core/formatters/base_text_formatter_spec.rb b/spec/rspec/core/formatters/base_text_formatter_spec.rb index e41f6e1528..239ccc964f 100644 --- a/spec/rspec/core/formatters/base_text_formatter_spec.rb +++ b/spec/rspec/core/formatters/base_text_formatter_spec.rb @@ -200,7 +200,7 @@ def run_all_and_dump_failures it "does not show the error class" do group.example("example name") { expect("this").to eq("that") } run_all_and_dump_failures - expect(formatter_output.string).not_to match(/RSpec/m) + expect(formatter_output.string).not_to match(/RSpec::/m) end end @@ -208,7 +208,7 @@ def run_all_and_dump_failures it "does not show the error class" do group.example("example name") { expect("this").to receive("that") } run_all_and_dump_failures - expect(formatter_output.string).not_to match(/RSpec/m) + expect(formatter_output.string).not_to match(/RSpec::/m) end end diff --git a/spec/support/formatter_support.rb b/spec/support/formatter_support.rb index ba08643658..ade8bba847 100644 --- a/spec/support/formatter_support.rb +++ b/spec/support/formatter_support.rb @@ -33,6 +33,7 @@ def run_rspec_with_formatter(formatter, options={}) runner = RSpec::Core::Runner.new(options) configuration = runner.configuration + configuration.filter_gems_from_backtrace "gems/bundler" configuration.backtrace_formatter.exclusion_patterns << /rspec_with_simplecov/ configuration.backtrace_formatter.inclusion_patterns = [] @@ -41,6 +42,7 @@ def run_rspec_with_formatter(formatter, options={}) runner.run(err, out) out.string end + RUN_LINE = __LINE__ - 3 def normalize_durations(output) output.gsub(/(?:\d+ minutes? )?\d+(?:\.\d+)?(s| seconds?)/) do |dur| @@ -66,7 +68,7 @@ def expected_summary_output_for_example_specs | | (compared using ==) | # ./spec/rspec/core/resources/formatter_specs.rb:18:in `block (3 levels) in ' - | # ./spec/support/formatter_support.rb:41:in `run_rspec_with_formatter' + | # ./spec/support/formatter_support.rb:#{RUN_LINE}:in `run_rspec_with_formatter' | # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter' | # ./spec/support/sandboxing.rb:16:in `block (3 levels) in ' | # ./spec/support/sandboxing.rb:7:in `block (2 levels) in ' @@ -86,7 +88,7 @@ def expected_summary_output_for_example_specs | | (compared using ==) | # ./spec/rspec/core/resources/formatter_specs.rb:37:in `block (2 levels) in ' - | # ./spec/support/formatter_support.rb:41:in `run_rspec_with_formatter' + | # ./spec/support/formatter_support.rb:#{RUN_LINE}:in `run_rspec_with_formatter' | # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter' | # ./spec/support/sandboxing.rb:16:in `block (3 levels) in ' | # ./spec/support/sandboxing.rb:7:in `block (2 levels) in ' @@ -117,7 +119,7 @@ def expected_summary_output_for_example_specs | foo | # (erb):1:in `
' | # ./spec/rspec/core/resources/formatter_specs.rb:50:in `block (2 levels) in ' - | # ./spec/support/formatter_support.rb:41:in `run_rspec_with_formatter' + | # ./spec/support/formatter_support.rb:#{RUN_LINE}:in `run_rspec_with_formatter' | # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter' | # ./spec/support/sandboxing.rb:16:in `block (3 levels) in ' | # ./spec/support/sandboxing.rb:7:in `block (2 levels) in '