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

Commit 830cb72

Browse files
committed
Unset RUBYOPT for rspec-rails run
1 parent ddbb2d0 commit 830cb72

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

script/functions.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ SPECS_HAVE_RUN_FILE=specs.out
1212
MAINTENANCE_BRANCH=`cat maintenance-branch`
1313

1414
# Don't allow rubygems to pollute what's loaded. Also, things boot faster
15-
# without the extra load time of rubygems. Only works on MRI Ruby 1.9+
16-
if is_mri_192_plus; then
15+
# without the extra load time of rubygems. Only works on MRI.
16+
if is_mri; then
1717
export RUBYOPT="--disable=gem"
1818
fi
1919

@@ -98,6 +98,17 @@ function run_spec_suite_for {
9898
fi;
9999
}
100100

101+
function run_spec_suite_for_rspec_rails {
102+
echo "Running specs for rspec-rails"
103+
pushd ../$1
104+
unset BUNDLE_GEMFILE
105+
unset RUBYOPT
106+
bundle_install_flags="--binstubs --standalone --without documentation --path ../bundle"
107+
travis_retry eval "(unset RUBYOPT; exec bundle install $bundle_install_flags)"
108+
run_specs_and_record_done
109+
popd
110+
}
111+
101112
function check_binstubs {
102113
echo "Checking required binstubs"
103114

@@ -188,11 +199,8 @@ function run_all_spec_suites {
188199
fold "rspec-core specs" run_spec_suite_for "rspec-core"
189200
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
190201
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"
202+
fold "rspec-support specs" run_spec_suite_for "rspec-support"
191203
if rspec_rails_compatible; then
192-
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
193-
fi
194-
195-
if rspec_support_compatible; then
196-
fold "rspec-support specs" run_spec_suite_for "rspec-support"
204+
fold "rspec-rails specs" run_spec_suite_for_rspec_rails
197205
fi
198206
}

0 commit comments

Comments
 (0)