diff options
author | Harshal Bhakta <harshal.c.bhakta@gmail.com> | 2023-09-29 15:42:16 +0530 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-02 02:19:43 +0000 |
commit | f208f78bdfc65341cb6547a378ff616b1928e48a (patch) | |
tree | 23090ae1c060b44dbd48cdbaaa59554e93639231 /spec | |
parent | f3aea74c3d63a9b1e0f597b060bf84c14d1c70fc (diff) | |
download | ruby-f208f78bdfc65341cb6547a378ff616b1928e48a.tar.gz |
[rubygems/rubygems] Support Ruby's preview version format (Ex: 3.3.0-preview2) in Gemfile
https://github.com/rubygems/rubygems/commit/4c1a0511b6
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/bundler/ruby_dsl_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/bundler/bundler/ruby_dsl_spec.rb b/spec/bundler/bundler/ruby_dsl_spec.rb index 6b00161571..c91804d96a 100644 --- a/spec/bundler/bundler/ruby_dsl_spec.rb +++ b/spec/bundler/bundler/ruby_dsl_spec.rb @@ -65,6 +65,15 @@ RSpec.describe Bundler::RubyDsl do it_behaves_like "it stores the ruby version" end + context "with a preview version" do + let(:ruby_version) { "3.3.0-preview2" } + + it "stores the version" do + expect(subject.versions).to eq(Array("3.3.0.preview2")) + expect(subject.gem_version.version).to eq("3.3.0.preview2") + end + end + context "with two requirements in the same string" do let(:ruby_version) { ">= 2.0.0, < 3.0" } it "raises an error" do |