From 3eb0d50c0baae916f4486c264605b18e77bee0dc Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 26 Oct 2019 20:52:59 +0200 Subject: [PATCH] Update to ruby/mspec@e171725 --- spec/mspec/lib/mspec/guards/platform.rb | 4 +--- spec/mspec/spec/guards/platform_spec.rb | 9 ++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/spec/mspec/lib/mspec/guards/platform.rb b/spec/mspec/lib/mspec/guards/platform.rb index c69401ea39..2d22d4fb59 100644 --- a/spec/mspec/lib/mspec/guards/platform.rb +++ b/spec/mspec/lib/mspec/guards/platform.rb @@ -6,10 +6,8 @@ class PlatformGuard < SpecGuard case name when :rubinius RUBY_ENGINE.start_with?('rbx') - when :ruby, :jruby, :truffleruby, :ironruby, :macruby, :maglev, :topaz, :opal - RUBY_ENGINE.start_with?(name.to_s) else - raise "unknown implementation #{name}" + RUBY_ENGINE.start_with?(name.to_s) end end end diff --git a/spec/mspec/spec/guards/platform_spec.rb b/spec/mspec/spec/guards/platform_spec.rb index ad1e3695ca..6088fb2ba6 100644 --- a/spec/mspec/spec/guards/platform_spec.rb +++ b/spec/mspec/spec/guards/platform_spec.rb @@ -165,11 +165,10 @@ describe PlatformGuard, ".implementation?" do PlatformGuard.implementation?(:ruby).should == true end - it "raises an error when passed an unrecognized name" do - stub_const 'RUBY_ENGINE', 'ruby' - lambda { - PlatformGuard.implementation?(:python) - }.should raise_error(/unknown implementation/) + it "works for an unrecognized name" do + stub_const 'RUBY_ENGINE', 'myrubyimplementation' + PlatformGuard.implementation?(:myrubyimplementation).should == true + PlatformGuard.implementation?(:other).should == false end end