Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Updates from rspec-dev (2017-07-15) #2447

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 2017-04-10T21:23:36+10:00 from the rspec-dev repo.
# This file was generated on 2017-07-15T20:27:04+07: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
Expand Down
21 changes: 7 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-04-10T21:23:36+10:00 from the rspec-dev repo.
# This file was generated on 2017-07-15T20:27:04+07:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

language: ruby
Expand Down Expand Up @@ -26,25 +26,18 @@ rvm:
- ruby-head
- ree
- rbx
- jruby
- jruby-head
- jruby-18mode
- jruby-9.1.2.0
matrix:
include:
- rvm: jruby
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false -Xcompat.version=2.0'
- rvm: jruby-head
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
- rvm: jruby-18mode
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
- rvm: jruby
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
- rvm: jruby-9.1.2.0
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
allow_failures:
- rvm: jruby-head
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
- rvm: ruby-head
- rvm: rbx
- rvm: 2.4.0-preview1
fast_finish: true
env:
- JRUBY_OPTS='--dev'
branches:
only:
- master
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-04-10T21:23:36+10:00 from the rspec-dev repo.
# This file was generated on 2017-07-15T20:27:04+07: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}"
Expand Down
5 changes: 4 additions & 1 deletion features/step_definitions/additional_cli_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@

Then(/^bisect should (succeed|fail) with output like:$/) do |succeed, expected_output|
last_process = only_processes.last
expect(last_exit_status).to eq(succeed == "succeed" ? 0 : 1)
expected_status = succeed == "succeed" ? 0 : 1
expect(last_exit_status).to eq(expected_status),
"Expected exit status of #{expected_status} but got #{last_exit_status} \n\n" \
"Output:\n\n#{last_process.stdout}"

expected = normalize_durations(expected_output)
actual = normalize_durations(last_process.stdout)
Expand Down
2 changes: 1 addition & 1 deletion script/clone_all_rspec_repos
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2017-04-10T21:23:36+10:00 from the rspec-dev repo.
# This file was generated on 2017-07-15T20:27:04+07: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
Expand Down
2 changes: 1 addition & 1 deletion script/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-04-10T21:23:36+10:00 from the rspec-dev repo.
# This file was generated on 2017-07-15T20:27:04+07: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 )"
Expand Down
2 changes: 1 addition & 1 deletion script/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-04-10T21:23:36+10:00 from the rspec-dev repo.
# This file was generated on 2017-07-15T20:27:04+07: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 {
Expand Down
2 changes: 1 addition & 1 deletion script/run_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2017-04-10T21:23:36+10:00 from the rspec-dev repo.
# This file was generated on 2017-07-15T20:27:04+07: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
Expand Down
2 changes: 1 addition & 1 deletion script/travis_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-04-10T21:23:36+10:00 from the rspec-dev repo.
# This file was generated on 2017-07-15T20:27:04+07: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:
Expand Down
17 changes: 16 additions & 1 deletion spec/rspec/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# JRuby appears to not respect `--disable=gem` so rubygems also gets loaded.
allowed_loaded_features << /rubygems/ if RSpec::Support::Ruby.jruby?

disable_autorun_code =
if RSpec::Support::OS.windows?
# On Windows, the "redefine autorun" approach results in a different
# exit status for a reason I don't understand, so we just disable
# autorun outright.
'RSpec::Core::Runner.disable_autorun!'
else
# On JRuby, the `disable_autorun!` approach leads to a stderr warning
# related to a deprecation emited when `rspec/core/autorun` gets loaded,
# because of `caller_filter` issues, so we redefine the autorun method
# instead. That works fine on all Rubies when we're not on Windows as
# well.
'RSpec::Core::Runner.instance_exec { undef :autorun; def autorun; end }'
end

it_behaves_like 'library wide checks', 'rspec-core',
:preamble_for_lib => [
# rspec-core loads a number of external libraries. We don't want them loaded
Expand Down Expand Up @@ -51,7 +66,7 @@
# Many files assume this has already been loaded and will have errors if it has not.
'require "rspec/core"',
# Prevent rspec/autorun from trying to run RSpec.
'RSpec::Core::Runner.disable_autorun!'
disable_autorun_code
], :skip_spec_files => %r{/fake_libs/}, :allowed_loaded_feature_regexps => allowed_loaded_features do
if RUBY_VERSION == '1.8.7'
before(:example, :description => /(issues no warnings when the spec files are loaded|stdlibs)/) do
Expand Down