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

Commit b1aca4d

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

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

script/functions.sh

Lines changed: 16 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,18 @@ function run_spec_suite_for {
9898
fi;
9999
}
100100

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

@@ -188,11 +200,8 @@ function run_all_spec_suites {
188200
fold "rspec-core specs" run_spec_suite_for "rspec-core"
189201
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
190202
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"
203+
fold "rspec-support specs" run_spec_suite_for "rspec-support"
191204
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"
205+
fold "rspec-rails specs" run_spec_suite_for_rspec_rails
197206
fi
198207
}

0 commit comments

Comments
 (0)