File tree Expand file tree Collapse file tree
integration/default/controls Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44ruby_build_install
55
6- ruby_build_definition '3.0.4' do
6+ ruby_version = platform_family? ( 'mac_os_x' ) ? '3.3.10' : '3.0.4'
7+
8+ ruby_build_definition ruby_version do
79 version_prefix true
8- patch 'test.patch'
10+ patch 'test.patch' unless platform_family? ( 'mac_os_x' )
911end
Original file line number Diff line number Diff line change 1+ ruby_version = os . darwin? ? '3.3.10' : '3.0.4'
2+ ruby_api_version = ruby_version . sub ( /\. \d +$/ , '.0' )
3+
14control 'Check definitions' do
25 impact 1.0
36 title 'Verify we can return a list of definitions'
47 desc 'Verify we can get a list of Ruby definitions'
58 describe command ( '/usr/local/bin/ruby-build --definitions' ) do
69 its ( 'exit_status' ) { should eq 0 }
7- its ( 'stdout' ) { should match /3.0.4 / }
10+ its ( 'stdout' ) { should match /#{ Regexp . escape ( ruby_version ) } / }
811 end
912end
1013
1922end
2023
2124gem_cmd = if os . darwin?
22- ' sudo /usr/local/ruby/3.0.4 /bin/gem install ffi --no-document'
25+ " sudo /usr/local/ruby/#{ ruby_version } /bin/gem install ffi --no-document"
2326 else
24- ' /usr/local/ruby/3.0.4 /bin/gem install ffi --no-document'
27+ " /usr/local/ruby/#{ ruby_version } /bin/gem install ffi --no-document"
2528 end
2629
2730control 'Install a Ruby gem' do
3437 its ( 'stdout' ) { should match /Successfully installed ffi/ }
3538 end
3639
37- describe command ( ' /usr/local/ruby/3.0.4 /bin/gem env' ) do
40+ describe command ( " /usr/local/ruby/#{ ruby_version } /bin/gem env" ) do
3841 its ( 'exit_status' ) { should eq 0 }
39- its ( 'stdout' ) { should match %r{gems/3.0.0 } }
42+ its ( 'stdout' ) { should match %r{gems/#{ Regexp . escape ( ruby_api_version ) } } }
4043 end
4144end
You can’t perform that action at this time.
0 commit comments