summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2018-09-06 23:58:15 +0200
committerBenoit Daloze <eregontp@gmail.com>2018-09-09 16:38:22 +0200
commited924f83a22b6b633223a0ccadbd2f4c497db0cb (patch)
tree9b82790511b8c9ca660e46722241043e2666c080
parent54c6c4960a002ff5c0f669a3e64adac4764a72d3 (diff)
downloadbundler-ed924f83a22b6b633223a0ccadbd2f4c497db0cb.tar.gz
Add specs for the truffleruby platform
-rw-r--r--spec/bundler/dsl_spec.rb2
-rw-r--r--spec/other/bundle_ruby_spec.rb13
-rw-r--r--spec/other/platform_spec.rb13
3 files changed, 27 insertions, 1 deletions
diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb
index f706e1b9ad..bffe4f1608 100644
--- a/spec/bundler/dsl_spec.rb
+++ b/spec/bundler/dsl_spec.rb
@@ -99,7 +99,7 @@ RSpec.describe Bundler::Dsl do
describe "#gem" do
[:ruby, :ruby_18, :ruby_19, :ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24, :ruby_25, :mri, :mri_18, :mri_19,
- :mri_20, :mri_21, :mri_22, :mri_23, :mri_24, :mri_25, :jruby, :rbx].each do |platform|
+ :mri_20, :mri_21, :mri_22, :mri_23, :mri_24, :mri_25, :jruby, :rbx, :truffleruby].each do |platform|
it "allows #{platform} as a valid platform" do
subject.gem("foo", :platform => platform)
end
diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb
index 6cc33f60ac..bcb38a63ca 100644
--- a/spec/other/bundle_ruby_spec.rb
+++ b/spec/other/bundle_ruby_spec.rb
@@ -54,6 +54,19 @@ RSpec.describe "bundle_ruby", :bundler => "< 2" do
expect(out).to include("ruby 1.8.7 (rbx 1.2.4)")
end
+ it "handles truffleruby" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ ruby "2.5.1", :engine => 'truffleruby', :engine_version => '1.0.0-rc6'
+
+ gem "foo"
+ G
+
+ bundle_ruby
+
+ expect(out).to include("ruby 2.5.1 (truffleruby 1.0.0-rc6)")
+ end
+
it "raises an error if engine is used but engine version is not" do
gemfile <<-G
source "file://#{gem_repo1}"
diff --git a/spec/other/platform_spec.rb b/spec/other/platform_spec.rb
index fea5daf5ac..3654b630df 100644
--- a/spec/other/platform_spec.rb
+++ b/spec/other/platform_spec.rb
@@ -149,6 +149,19 @@ G
expect(out).to eq("ruby 1.8.7 (rbx 1.2.4)")
end
+ it "handles truffleruby" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ ruby "2.5.1", :engine => 'truffleruby', :engine_version => '1.0.0-rc6'
+
+ gem "foo"
+ G
+
+ bundle "platform --ruby"
+
+ expect(out).to eq("ruby 2.5.1 (truffleruby 1.0.0-rc6)")
+ end
+
it "raises an error if engine is used but engine version is not" do
gemfile <<-G
source "file://#{gem_repo1}"