Stub the test ruby instead of downloading a live-ruby
postmodern opened this issue · 2 comments
postmodern commented
The stub_bin_ruby branch which I have started now generates the test ruby's bin/ruby
script to be a stub script that returns the expected output when the expected input is given. How or when the script should be generated, or if the bin/ruby
script should be committed, are still unanswered questions.
Benefits
- No longer relying on RVM's outdated binaries.
- CI now passes!
- Speeds up CI run time.
- Saves GitHub some bandwidth.
Disadvantages
- We're essentially testing against mocks and stubs, not real-world rubies.
- Will need to add proper integration tests that run against
/opt/rubies/
.
postmodern commented
I am now leaning towards adding a test/configure
script that will generate the test/root/opt/rubies/
directory and bin/ruby
, as well as a ruby.sh
helper. This can also be used to re-generate the test fixtures when we wish to change settings.
postmodern commented
Renamed test/setup
to test/configure
and store test configuration in test/config.sh
. Now test/fixtures/root/opt/rubies
are auto-re-generated on each test run.