|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +RSpec.describe Bundler::CurrentRuby do |
| 4 | + describe "PLATFORM_MAP" do |
| 5 | + subject { described_class::PLATFORM_MAP } |
| 6 | + |
| 7 | + # rubocop:disable Naming/VariableNumber |
| 8 | + let(:platforms) do |
| 9 | + { ruby: Gem::Platform::RUBY, |
| 10 | + ruby_18: Gem::Platform::RUBY, |
| 11 | + ruby_19: Gem::Platform::RUBY, |
| 12 | + ruby_20: Gem::Platform::RUBY, |
| 13 | + ruby_21: Gem::Platform::RUBY, |
| 14 | + ruby_22: Gem::Platform::RUBY, |
| 15 | + ruby_23: Gem::Platform::RUBY, |
| 16 | + ruby_24: Gem::Platform::RUBY, |
| 17 | + ruby_25: Gem::Platform::RUBY, |
| 18 | + ruby_26: Gem::Platform::RUBY, |
| 19 | + ruby_27: Gem::Platform::RUBY, |
| 20 | + ruby_30: Gem::Platform::RUBY, |
| 21 | + ruby_31: Gem::Platform::RUBY, |
| 22 | + ruby_32: Gem::Platform::RUBY, |
| 23 | + ruby_33: Gem::Platform::RUBY, |
| 24 | + ruby_34: Gem::Platform::RUBY, |
| 25 | + ruby_35: Gem::Platform::RUBY, |
| 26 | + mri: Gem::Platform::RUBY, |
| 27 | + mri_18: Gem::Platform::RUBY, |
| 28 | + mri_19: Gem::Platform::RUBY, |
| 29 | + mri_20: Gem::Platform::RUBY, |
| 30 | + mri_21: Gem::Platform::RUBY, |
| 31 | + mri_22: Gem::Platform::RUBY, |
| 32 | + mri_23: Gem::Platform::RUBY, |
| 33 | + mri_24: Gem::Platform::RUBY, |
| 34 | + mri_25: Gem::Platform::RUBY, |
| 35 | + mri_26: Gem::Platform::RUBY, |
| 36 | + mri_27: Gem::Platform::RUBY, |
| 37 | + mri_30: Gem::Platform::RUBY, |
| 38 | + mri_31: Gem::Platform::RUBY, |
| 39 | + mri_32: Gem::Platform::RUBY, |
| 40 | + mri_33: Gem::Platform::RUBY, |
| 41 | + mri_34: Gem::Platform::RUBY, |
| 42 | + mri_35: Gem::Platform::RUBY, |
| 43 | + rbx: Gem::Platform::RUBY, |
| 44 | + truffleruby: Gem::Platform::RUBY, |
| 45 | + jruby: Gem::Platform::JAVA, |
| 46 | + jruby_18: Gem::Platform::JAVA, |
| 47 | + jruby_19: Gem::Platform::JAVA, |
| 48 | + windows: Gem::Platform::WINDOWS, |
| 49 | + windows_18: Gem::Platform::WINDOWS, |
| 50 | + windows_19: Gem::Platform::WINDOWS, |
| 51 | + windows_20: Gem::Platform::WINDOWS, |
| 52 | + windows_21: Gem::Platform::WINDOWS, |
| 53 | + windows_22: Gem::Platform::WINDOWS, |
| 54 | + windows_23: Gem::Platform::WINDOWS, |
| 55 | + windows_24: Gem::Platform::WINDOWS, |
| 56 | + windows_25: Gem::Platform::WINDOWS, |
| 57 | + windows_26: Gem::Platform::WINDOWS, |
| 58 | + windows_27: Gem::Platform::WINDOWS, |
| 59 | + windows_30: Gem::Platform::WINDOWS, |
| 60 | + windows_31: Gem::Platform::WINDOWS, |
| 61 | + windows_32: Gem::Platform::WINDOWS, |
| 62 | + windows_33: Gem::Platform::WINDOWS, |
| 63 | + windows_34: Gem::Platform::WINDOWS, |
| 64 | + windows_35: Gem::Platform::WINDOWS } |
| 65 | + end |
| 66 | + |
| 67 | + let(:deprecated) do |
| 68 | + { mswin: Gem::Platform::MSWIN, |
| 69 | + mswin_18: Gem::Platform::MSWIN, |
| 70 | + mswin_19: Gem::Platform::MSWIN, |
| 71 | + mswin_20: Gem::Platform::MSWIN, |
| 72 | + mswin_21: Gem::Platform::MSWIN, |
| 73 | + mswin_22: Gem::Platform::MSWIN, |
| 74 | + mswin_23: Gem::Platform::MSWIN, |
| 75 | + mswin_24: Gem::Platform::MSWIN, |
| 76 | + mswin_25: Gem::Platform::MSWIN, |
| 77 | + mswin_26: Gem::Platform::MSWIN, |
| 78 | + mswin_27: Gem::Platform::MSWIN, |
| 79 | + mswin_30: Gem::Platform::MSWIN, |
| 80 | + mswin_31: Gem::Platform::MSWIN, |
| 81 | + mswin_32: Gem::Platform::MSWIN, |
| 82 | + mswin_33: Gem::Platform::MSWIN, |
| 83 | + mswin_34: Gem::Platform::MSWIN, |
| 84 | + mswin_35: Gem::Platform::MSWIN, |
| 85 | + mswin64: Gem::Platform::MSWIN64, |
| 86 | + mswin64_19: Gem::Platform::MSWIN64, |
| 87 | + mswin64_20: Gem::Platform::MSWIN64, |
| 88 | + mswin64_21: Gem::Platform::MSWIN64, |
| 89 | + mswin64_22: Gem::Platform::MSWIN64, |
| 90 | + mswin64_23: Gem::Platform::MSWIN64, |
| 91 | + mswin64_24: Gem::Platform::MSWIN64, |
| 92 | + mswin64_25: Gem::Platform::MSWIN64, |
| 93 | + mswin64_26: Gem::Platform::MSWIN64, |
| 94 | + mswin64_27: Gem::Platform::MSWIN64, |
| 95 | + mswin64_30: Gem::Platform::MSWIN64, |
| 96 | + mswin64_31: Gem::Platform::MSWIN64, |
| 97 | + mswin64_32: Gem::Platform::MSWIN64, |
| 98 | + mswin64_33: Gem::Platform::MSWIN64, |
| 99 | + mswin64_34: Gem::Platform::MSWIN64, |
| 100 | + mswin64_35: Gem::Platform::MSWIN64, |
| 101 | + mingw: Gem::Platform::MINGW, |
| 102 | + mingw_18: Gem::Platform::MINGW, |
| 103 | + mingw_19: Gem::Platform::MINGW, |
| 104 | + mingw_20: Gem::Platform::MINGW, |
| 105 | + mingw_21: Gem::Platform::MINGW, |
| 106 | + mingw_22: Gem::Platform::MINGW, |
| 107 | + mingw_23: Gem::Platform::MINGW, |
| 108 | + mingw_24: Gem::Platform::MINGW, |
| 109 | + mingw_25: Gem::Platform::MINGW, |
| 110 | + mingw_26: Gem::Platform::MINGW, |
| 111 | + mingw_27: Gem::Platform::MINGW, |
| 112 | + mingw_30: Gem::Platform::MINGW, |
| 113 | + mingw_31: Gem::Platform::MINGW, |
| 114 | + mingw_32: Gem::Platform::MINGW, |
| 115 | + mingw_33: Gem::Platform::MINGW, |
| 116 | + mingw_34: Gem::Platform::MINGW, |
| 117 | + mingw_35: Gem::Platform::MINGW, |
| 118 | + x64_mingw: Gem::Platform::X64_MINGW, |
| 119 | + x64_mingw_20: Gem::Platform::X64_MINGW, |
| 120 | + x64_mingw_21: Gem::Platform::X64_MINGW, |
| 121 | + x64_mingw_22: Gem::Platform::X64_MINGW, |
| 122 | + x64_mingw_23: Gem::Platform::X64_MINGW, |
| 123 | + x64_mingw_24: Gem::Platform::X64_MINGW, |
| 124 | + x64_mingw_25: Gem::Platform::X64_MINGW, |
| 125 | + x64_mingw_26: Gem::Platform::X64_MINGW, |
| 126 | + x64_mingw_27: Gem::Platform::X64_MINGW, |
| 127 | + x64_mingw_30: Gem::Platform::X64_MINGW, |
| 128 | + x64_mingw_31: Gem::Platform::X64_MINGW, |
| 129 | + x64_mingw_32: Gem::Platform::X64_MINGW, |
| 130 | + x64_mingw_33: Gem::Platform::X64_MINGW, |
| 131 | + x64_mingw_34: Gem::Platform::X64_MINGW, |
| 132 | + x64_mingw_35: Gem::Platform::X64_MINGW } |
| 133 | + end |
| 134 | + # rubocop:enable Naming/VariableNumber |
| 135 | + |
| 136 | + it "includes all platforms" do |
| 137 | + expect(subject).to eq(platforms.merge(deprecated)) |
| 138 | + end |
| 139 | + end |
| 140 | +end |
0 commit comments