ruby-changes:58461
From: Benoit <ko1@a...>
Date: Sun, 27 Oct 2019 03:54:34 +0900 (JST)
Subject: [ruby-changes:58461] 3eb0d50c0b (master): Update to ruby/mspec@e171725
https://git.ruby-lang.org/ruby.git/commit/?id=3eb0d50c0b From 3eb0d50c0baae916f4486c264605b18e77bee0dc Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Sat, 26 Oct 2019 20:52:59 +0200 Subject: Update to ruby/mspec@e171725 diff --git a/spec/mspec/lib/mspec/guards/platform.rb b/spec/mspec/lib/mspec/guards/platform.rb index c69401e..2d22d4f 100644 --- a/spec/mspec/lib/mspec/guards/platform.rb +++ b/spec/mspec/lib/mspec/guards/platform.rb @@ -6,10 +6,8 @@ class PlatformGuard < SpecGuard https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/guards/platform.rb#L6 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 ad1e369..6088fb2 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 https://github.com/ruby/ruby/blob/trunk/spec/mspec/spec/guards/platform_spec.rb#L165 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/