test for both 2.6.x and 2.6

This commit is contained in:
MSP-Greg
2020-01-17 17:56:56 -06:00
parent dfc96c5570
commit 1d486b38c4

View File

@@ -35,6 +35,22 @@ describe('find-ruby', () => {
await findRubyVersion('17.0.0');
});
it('Uses 9.0.x version of ruby installed in cache ', async () => {
const rubyDir: string = path.join(toolDir, 'Ruby', '9.0.1', os.arch());
await io.mkdirP(rubyDir);
fs.writeFileSync(`${rubyDir}.complete`, 'hello');
// This will throw if it doesn't find it in the cache (because no such version exists)
await findRubyVersion('9.0.x');
});
it('Uses 9.0 version of ruby installed in cache ', async () => {
const rubyDir: string = path.join(toolDir, 'Ruby', '9.0.1', os.arch());
await io.mkdirP(rubyDir);
fs.writeFileSync(`${rubyDir}.complete`, 'hello');
// This will throw if it doesn't find it in the cache (because no such version exists)
await findRubyVersion('9.0');
});
it('findRubyVersion throws if cannot find any version of ruby', async () => {
let thrown = false;
try {