File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 77
88 before { FileUtils . mkdir_p tmp_root }
99
10+ def with_clean_env
11+ if Bundler . respond_to? ( :with_unbundled_env )
12+ Bundler . with_unbundled_env { yield }
13+ else
14+ Bundler . with_clean_env { yield }
15+ end
16+ end
17+
1018 it "fails when libraries are not required" do
1119 script = tmp_root . join ( "fail_sanity_check" )
1220 File . open ( script , "w" ) do |f |
1725 end
1826 FileUtils . chmod 0777 , script
1927
20- Bundler . with_clean_env do
28+ with_clean_env do
2129 expect ( `bundle exec #{ script } 2>&1` ) .
2230 to match ( /uninitialized constant RSpec::Support/ ) .
2331 or match ( /undefined method `require_rspec_core' for RSpec::Support:Module/ )
3846 end
3947 FileUtils . chmod 0777 , script
4048
41- Bundler . with_clean_env do
49+ with_clean_env do
4250 expect ( `bundle exec #{ script } 2>&1` ) . to be_empty
4351 expect ( $?. exitstatus ) . to eq ( 0 )
4452 end
You can’t perform that action at this time.
0 commit comments