diff options
Diffstat (limited to 'spec/ruby/command_line/dash_v_spec.rb')
| -rw-r--r-- | spec/ruby/command_line/dash_v_spec.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/ruby/command_line/dash_v_spec.rb b/spec/ruby/command_line/dash_v_spec.rb index 2ee9099419..6a4f7d3a15 100644 --- a/spec/ruby/command_line/dash_v_spec.rb +++ b/spec/ruby/command_line/dash_v_spec.rb @@ -1,12 +1,15 @@ -require File.expand_path('../../spec_helper', __FILE__) -require File.expand_path('../shared/verbose', __FILE__) +require_relative '../spec_helper' +require_relative 'shared/verbose' describe "The -v command line option" do it_behaves_like :command_line_verbose, "-v" describe "when used alone" do it "prints version and ends" do - ruby_exe(nil, args: '-v').include?(RUBY_DESCRIPTION).should == true - end + ruby_exe(nil, args: '-v').gsub("+PRISM ", "").should.include?(RUBY_DESCRIPTION.gsub("+PRISM ", "")) + end unless (defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?) || + (defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?) || + (ENV['RUBY_GC_LIBRARY'] && ENV['RUBY_GC_LIBRARY'].length > 0) || + (ENV['RUBY_MN_THREADS'] == '1') end end |
