summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/runtime/inline_spec.rb5
-rw-r--r--spec/runtime/setup_spec.rb2
-rw-r--r--spec/support/helpers.rb2
3 files changed, 5 insertions, 4 deletions
diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb
index 06be2ef83d..afb9c3d180 100644
--- a/spec/runtime/inline_spec.rb
+++ b/spec/runtime/inline_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe "bundler/inline#gemfile" do
requires = ["#{lib_dir}/bundler/inline"]
requires.unshift "#{spec_dir}/support/artifice/" + options.delete(:artifice) if options.key?(:artifice)
requires = requires.map {|r| "require '#{r}'" }.join("\n")
- @out = ruby("#{requires}\n\n" + code, options)
+ ruby("#{requires}\n\n" + code, options)
end
before :each do
@@ -88,9 +88,8 @@ RSpec.describe "bundler/inline#gemfile" do
RUBY
expect(out).to include("Installing activesupport")
- err.gsub! %r{(.*lib/sinatra/base\.rb:\d+: warning: constant ::Fixnum is deprecated$)}, ""
err_lines = err.split("\n")
- err_lines.reject!{|line| line =~ /\.rb:\d+: warning: / }
+ err_lines.reject!{|line| line =~ /\.rb:\d+: warning: / } unless RUBY_VERSION < "2.7"
expect(err_lines).to be_empty
expect(exitstatus).to be_zero if exitstatus
end
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 4a754945b7..d86d1320ea 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -1027,6 +1027,8 @@ end
ruby <<-RUBY
require '#{lib_dir}/bundler'
+ bundler_module = class << Bundler; self; end
+ bundler_module.send(:remove_method, :require)
def Bundler.require(path)
raise "LOSE"
end
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 911f734d8b..d085b769d7 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -174,7 +174,7 @@ module Spec
env = options.delete(:env) || {}
ruby = ruby.gsub(/["`\$]/) {|m| "\\#{m}" }
lib_option = options[:no_lib] ? "" : " -I#{lib_dir}"
- sys_exec(%(#{Gem.ruby}#{lib_option} -e "#{ruby}"), env)
+ sys_exec(%(#{Gem.ruby}#{lib_option} -w -e "#{ruby}"), env)
end
bang :ruby