diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/bundler/dependency_spec.rb | 16 | ||||
-rw-r--r-- | spec/bundler/bundler/dsl_spec.rb | 9 |
2 files changed, 22 insertions, 3 deletions
diff --git a/spec/bundler/bundler/dependency_spec.rb b/spec/bundler/bundler/dependency_spec.rb index 9b9e2ddf0a..6e346c36c1 100644 --- a/spec/bundler/bundler/dependency_spec.rb +++ b/spec/bundler/bundler/dependency_spec.rb @@ -53,6 +53,8 @@ RSpec.describe Bundler::Dependency do :ruby_27 => Gem::Platform::RUBY, :ruby_30 => Gem::Platform::RUBY, :ruby_31 => Gem::Platform::RUBY, + :ruby_32 => Gem::Platform::RUBY, + :ruby_33 => Gem::Platform::RUBY, :mri => Gem::Platform::RUBY, :mri_18 => Gem::Platform::RUBY, :mri_19 => Gem::Platform::RUBY, @@ -66,6 +68,8 @@ RSpec.describe Bundler::Dependency do :mri_27 => Gem::Platform::RUBY, :mri_30 => Gem::Platform::RUBY, :mri_31 => Gem::Platform::RUBY, + :mri_32 => Gem::Platform::RUBY, + :mri_33 => Gem::Platform::RUBY, :rbx => Gem::Platform::RUBY, :truffleruby => Gem::Platform::RUBY, :jruby => Gem::Platform::JAVA, @@ -84,6 +88,8 @@ RSpec.describe Bundler::Dependency do :windows_27 => Gem::Platform::WINDOWS, :windows_30 => Gem::Platform::WINDOWS, :windows_31 => Gem::Platform::WINDOWS, + :windows_32 => Gem::Platform::WINDOWS, + :windows_33 => Gem::Platform::WINDOWS, :mswin => Gem::Platform::MSWIN, :mswin_18 => Gem::Platform::MSWIN, :mswin_19 => Gem::Platform::MSWIN, @@ -97,6 +103,8 @@ RSpec.describe Bundler::Dependency do :mswin_27 => Gem::Platform::MSWIN, :mswin_30 => Gem::Platform::MSWIN, :mswin_31 => Gem::Platform::MSWIN, + :mswin_32 => Gem::Platform::MSWIN, + :mswin_33 => Gem::Platform::MSWIN, :mswin64 => Gem::Platform::MSWIN64, :mswin64_19 => Gem::Platform::MSWIN64, :mswin64_20 => Gem::Platform::MSWIN64, @@ -109,6 +117,8 @@ RSpec.describe Bundler::Dependency do :mswin64_27 => Gem::Platform::MSWIN64, :mswin64_30 => Gem::Platform::MSWIN64, :mswin64_31 => Gem::Platform::MSWIN64, + :mswin64_32 => Gem::Platform::MSWIN64, + :mswin64_33 => Gem::Platform::MSWIN64, :mingw => Gem::Platform::MINGW, :mingw_18 => Gem::Platform::MINGW, :mingw_19 => Gem::Platform::MINGW, @@ -122,6 +132,8 @@ RSpec.describe Bundler::Dependency do :mingw_27 => Gem::Platform::MINGW, :mingw_30 => Gem::Platform::MINGW, :mingw_31 => Gem::Platform::MINGW, + :mingw_32 => Gem::Platform::MINGW, + :mingw_33 => Gem::Platform::MINGW, :x64_mingw => Gem::Platform::X64_MINGW, :x64_mingw_20 => Gem::Platform::X64_MINGW, :x64_mingw_21 => Gem::Platform::X64_MINGW, @@ -132,7 +144,9 @@ RSpec.describe Bundler::Dependency do :x64_mingw_26 => Gem::Platform::X64_MINGW, :x64_mingw_27 => Gem::Platform::X64_MINGW, :x64_mingw_30 => Gem::Platform::X64_MINGW, - :x64_mingw_31 => Gem::Platform::X64_MINGW } + :x64_mingw_31 => Gem::Platform::X64_MINGW, + :x64_mingw_32 => Gem::Platform::X64_MINGW, + :x64_mingw_33 => Gem::Platform::X64_MINGW } end # rubocop:enable Naming/VariableNumber diff --git a/spec/bundler/bundler/dsl_spec.rb b/spec/bundler/bundler/dsl_spec.rb index 8cb51b8a52..8b5bf930f2 100644 --- a/spec/bundler/bundler/dsl_spec.rb +++ b/spec/bundler/bundler/dsl_spec.rb @@ -139,14 +139,19 @@ RSpec.describe Bundler::Dsl do describe "#gem" do # rubocop:disable Naming/VariableNumber [:ruby, :ruby_18, :ruby_19, :ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24, :ruby_25, :ruby_26, :ruby_27, - :ruby_30, :ruby_31, :mri, :mri_18, :mri_19, :mri_20, :mri_21, :mri_22, :mri_23, :mri_24, :mri_25, :mri_26, - :mri_27, :mri_30, :mri_31, :jruby, :rbx, :truffleruby].each do |platform| + :ruby_30, :ruby_31, :ruby_32, :ruby_33, :mri, :mri_18, :mri_19, :mri_20, :mri_21, :mri_22, :mri_23, :mri_24, + :mri_25, :mri_26, :mri_27, :mri_30, :mri_31, :mri_32, :mri_33, :jruby, :rbx, :truffleruby].each do |platform| it "allows #{platform} as a valid platform" do subject.gem("foo", :platform => platform) end end # rubocop:enable Naming/VariableNumber + it "allows platforms matching the running Ruby version" do + platform = "ruby_#{RbConfig::CONFIG["MAJOR"]}#{RbConfig::CONFIG["MINOR"]}" + subject.gem("foo", :platform => platform) + end + it "rejects invalid platforms" do expect { subject.gem("foo", :platform => :bogus) }. to raise_error(Bundler::GemfileError, /is not a valid platform/) |