[前][次][番号順一覧][スレッド一覧]

ruby-changes:65666

From: Benoit <ko1@a...>
Date: Sat, 27 Mar 2021 21:03:25 +0900 (JST)
Subject: [ruby-changes:65666] 44736a6b7a (master): Update to ruby/mspec@d1adf59

https://git.ruby-lang.org/ruby.git/commit/?id=44736a6b7a

From 44736a6b7a2b3475db2d05187f33e3c1a7b4b4e5 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Sat, 27 Mar 2021 13:02:38 +0100
Subject: Update to ruby/mspec@d1adf59

---
 spec/mspec/Gemfile                                 |   2 +-
 spec/mspec/Gemfile.lock                            |  25 +-
 spec/mspec/lib/mspec/expectations/should.rb        |  10 +-
 spec/mspec/lib/mspec/helpers/warning.rb            |   2 +
 spec/mspec/lib/mspec/matchers/raise_error.rb       |   2 +
 spec/mspec/lib/mspec/runner/formatters/junit.rb    |   6 +-
 spec/mspec/spec/commands/mkspec_spec.rb            | 194 ++++-----
 spec/mspec/spec/commands/mspec_ci_spec.rb          |  72 ++--
 spec/mspec/spec/commands/mspec_run_spec.rb         |  74 ++--
 spec/mspec/spec/commands/mspec_spec.rb             | 106 ++---
 spec/mspec/spec/commands/mspec_tag_spec.rb         | 170 ++++----
 spec/mspec/spec/expectations/expectations_spec.rb  |  18 +-
 spec/mspec/spec/expectations/should.rb             |  73 ----
 spec/mspec/spec/expectations/should_spec.rb        |  18 +-
 spec/mspec/spec/fixtures/should.rb                 |  75 ++++
 spec/mspec/spec/guards/block_device_spec.rb        |  26 +-
 spec/mspec/spec/guards/bug_spec.rb                 |  84 ++--
 spec/mspec/spec/guards/conflict_spec.rb            |  30 +-
 spec/mspec/spec/guards/endian_spec.rb              |  34 +-
 spec/mspec/spec/guards/feature_spec.rb             |  82 ++--
 spec/mspec/spec/guards/guard_spec.rb               | 218 +++++-----
 spec/mspec/spec/guards/platform_spec.rb            | 188 ++++----
 spec/mspec/spec/guards/quarantine_spec.rb          |  20 +-
 spec/mspec/spec/guards/superuser_spec.rb           |  22 +-
 spec/mspec/spec/guards/support_spec.rb             |  28 +-
 spec/mspec/spec/guards/user_spec.rb                |  10 +-
 spec/mspec/spec/guards/version_spec.rb             |  92 ++--
 spec/mspec/spec/helpers/argf_spec.rb               |  16 +-
 spec/mspec/spec/helpers/argv_spec.rb               |  10 +-
 spec/mspec/spec/helpers/datetime_spec.rb           |  18 +-
 spec/mspec/spec/helpers/fixture_spec.rb            |   8 +-
 spec/mspec/spec/helpers/flunk_spec.rb              |  10 +-
 spec/mspec/spec/helpers/fs_spec.rb                 |  60 +--
 spec/mspec/spec/helpers/io_spec.rb                 |  48 +--
 spec/mspec/spec/helpers/mock_to_path_spec.rb       |  14 +-
 spec/mspec/spec/helpers/numeric_spec.rb            |  14 +-
 spec/mspec/spec/helpers/ruby_exe_spec.rb           | 109 ++---
 spec/mspec/spec/helpers/scratch_spec.rb            |  10 +-
 spec/mspec/spec/helpers/suppress_warning_spec.rb   |   4 +-
 spec/mspec/spec/helpers/tmp_spec.rb                |  10 +-
 spec/mspec/spec/integration/interpreter_spec.rb    |   8 +-
 spec/mspec/spec/integration/object_methods_spec.rb |   6 +-
 spec/mspec/spec/integration/run_spec.rb            |  34 +-
 spec/mspec/spec/integration/tag_spec.rb            |  10 +-
 spec/mspec/spec/matchers/base_spec.rb              | 140 +++---
 spec/mspec/spec/matchers/be_an_instance_of_spec.rb |  22 +-
 spec/mspec/spec/matchers/be_ancestor_of_spec.rb    |  10 +-
 spec/mspec/spec/matchers/be_close_spec.rb          |  24 +-
 spec/mspec/spec/matchers/be_computed_by_spec.rb    |  14 +-
 spec/mspec/spec/matchers/be_empty_spec.rb          |  10 +-
 spec/mspec/spec/matchers/be_false_spec.rb          |  16 +-
 spec/mspec/spec/matchers/be_kind_of_spec.rb        |  22 +-
 spec/mspec/spec/matchers/be_nan_spec.rb            |  12 +-
 spec/mspec/spec/matchers/be_nil_spec.rb            |  14 +-
 spec/mspec/spec/matchers/be_true_or_false_spec.rb  |   8 +-
 spec/mspec/spec/matchers/be_true_spec.rb           |  16 +-
 spec/mspec/spec/matchers/block_caller_spec.rb      |   6 +-
 spec/mspec/spec/matchers/complain_spec.rb          |  43 +-
 spec/mspec/spec/matchers/eql_spec.rb               |  22 +-
 spec/mspec/spec/matchers/equal_element_spec.rb     |  78 ++--
 spec/mspec/spec/matchers/equal_spec.rb             |  20 +-
 .../spec/matchers/have_class_variable_spec.rb      |  18 +-
 spec/mspec/spec/matchers/have_constant_spec.rb     |  14 +-
 .../spec/matchers/have_instance_method_spec.rb     |  20 +-
 .../spec/matchers/have_instance_variable_spec.rb   |  18 +-
 spec/mspec/spec/matchers/have_method_spec.rb       |  24 +-
 .../matchers/have_private_instance_method_spec.rb  |  20 +-
 .../spec/matchers/have_private_method_spec.rb      |  16 +-
 .../have_protected_instance_method_spec.rb         |  20 +-
 .../matchers/have_public_instance_method_spec.rb   |  20 +-
 .../spec/matchers/have_singleton_method_spec.rb    |  16 +-
 spec/mspec/spec/matchers/include_any_of_spec.rb    |  26 +-
 spec/mspec/spec/matchers/include_spec.rb           |  22 +-
 spec/mspec/spec/matchers/infinity_spec.rb          |  18 +-
 spec/mspec/spec/matchers/match_yaml_spec.rb        |  22 +-
 spec/mspec/spec/matchers/output_spec.rb            |  48 ++-
 spec/mspec/spec/matchers/output_to_fd_spec.rb      |  30 +-
 spec/mspec/spec/matchers/raise_error_spec.rb       |  90 ++--
 spec/mspec/spec/matchers/respond_to_spec.rb        |  26 +-
 spec/mspec/spec/matchers/signed_zero_spec.rb       |  18 +-
 spec/mspec/spec/mocks/mock_spec.rb                 | 238 +++++------
 spec/mspec/spec/mocks/proxy_spec.rb                | 196 ++++-----
 spec/mspec/spec/runner/actions/filter_spec.rb      |  44 +-
 spec/mspec/spec/runner/actions/tag_spec.rb         | 144 +++----
 spec/mspec/spec/runner/actions/taglist_spec.rb     |  70 +--
 spec/mspec/spec/runner/actions/tagpurge_spec.rb    |  66 +--
 spec/mspec/spec/runner/actions/tally_spec.rb       | 167 ++++----
 spec/mspec/spec/runner/actions/timer_spec.rb       |  22 +-
 spec/mspec/spec/runner/context_spec.rb             | 342 +++++++--------
 spec/mspec/spec/runner/example_spec.rb             |  50 +--
 spec/mspec/spec/runner/exception_spec.rb           |  50 +--
 spec/mspec/spec/runner/filters/match_spec.rb       |  16 +-
 spec/mspec/spec/runner/filters/profile_spec.rb     |  70 +--
 spec/mspec/spec/runner/filters/regexp_spec.rb      |  18 +-
 spec/mspec/spec/runner/filters/tag_spec.rb         |  48 +--
 spec/mspec/spec/runner/formatters/describe_spec.rb |  24 +-
 spec/mspec/spec/runner/formatters/dotted_spec.rb   | 119 +++---
 spec/mspec/spec/runner/formatters/file_spec.rb     |  34 +-
 spec/mspec/spec/runner/formatters/html_spec.rb     |  88 ++--
 spec/mspec/spec/runner/formatters/junit_spec.rb    | 100 +++--
 spec/mspec/spec/runner/formatters/method_spec.rb   |  69 ++-
 spec/mspec/spec/runner/formatters/multi_spec.rb    |  20 +-
 spec/mspec/spec/runner/formatters/specdoc_spec.rb  |  30 +-
 spec/mspec/spec/runner/formatters/spinner_spec.rb  |  32 +-
 spec/mspec/spec/runner/formatters/summary_spec.rb  |   4 +-
 spec/mspec/spec/runner/formatters/unit_spec.rb     |  33 +-
 spec/mspec/spec/runner/formatters/yaml_spec.rb     |  79 ++--
 spec/mspec/spec/runner/mspec_spec.rb               | 287 +++++++------
 spec/mspec/spec/runner/shared_spec.rb              |  20 +-
 spec/mspec/spec/runner/tag_spec.rb                 |  96 ++---
 spec/mspec/spec/spec_helper.rb                     |  21 +-
 spec/mspec/spec/utils/deprecate_spec.rb            |  10 +-
 spec/mspec/spec/utils/name_map_spec.rb             |  78 ++--
 spec/mspec/spec/utils/options_spec.rb              | 476 ++++++++++-----------
 spec/mspec/spec/utils/script_spec.rb               | 252 +++++------
 spec/mspec/spec/utils/version_spec.rb              |  30 +-
 116 files changed, 3286 insertions(+), 3190 deletions(-)
 delete mode 100644 spec/mspec/spec/expectations/should.rb
 create mode 100644 spec/mspec/spec/fixtures/should.rb

diff --git a/spec/mspec/Gemfile b/spec/mspec/Gemfile
index 8e463cd..617a995 100644
--- a/spec/mspec/Gemfile
+++ b/spec/mspec/Gemfile
@@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/spec/mspec/Gemfile#L1
 source 'https://rubygems.org'
 
 gem "rake", "~> 12.3"
-gem "rspec", "~> 2.14.1"
+gem "rspec", "~> 3.0"
diff --git a/spec/mspec/Gemfile.lock b/spec/mspec/Gemfile.lock
index 74489c5..cd39906 100644
--- a/spec/mspec/Gemfile.lock
+++ b/spec/mspec/Gemfile.lock
@@ -1,16 +1,21 @@ https://github.com/ruby/ruby/blob/trunk/spec/mspec/Gemfile.lock#L1
 GEM
   remote: https://rubygems.org/
   specs:
-    diff-lcs (1.3)
+    diff-lcs (1.4.4)
     rake (12.3.3)
-    rspec (2.14.1)
-      rspec-core (~> 2.14.0)
-      rspec-expectations (~> 2.14.0)
-      rspec-mocks (~> 2.14.0)
-    rspec-core (2.14.8)
-    rspec-expectations (2.14.5)
-      diff-lcs (>= 1.1.3, < 2.0)
-    rspec-mocks (2.14.6)
+    rspec (3.10.0)
+      rspec-core (~> 3.10.0)
+      rspec-expectations (~> 3.10.0)
+      rspec-mocks (~> 3.10.0)
+    rspec-core (3.10.1)
+      rspec-support (~> 3.10.0)
+    rspec-expectations (3.10.1)
+      diff-lcs (>= 1.2.0, < 2.0)
+      rspec-support (~> 3.10.0)
+    rspec-mocks (3.10.2)
+      diff-lcs (>= 1.2.0, < 2.0)
+      rspec-support (~> 3.10.0)
+    rspec-support (3.10.2)
 
 PLATFORMS
   java
@@ -18,4 +23,4 @@ PLATFORMS https://github.com/ruby/ruby/blob/trunk/spec/mspec/Gemfile.lock#L23
 
 DEPENDENCIES
   rake (~> 12.3)
-  rspec (~> 2.14.1)
+  rspec (~> 3.0)
diff --git a/spec/mspec/lib/mspec/expectations/should.rb b/spec/mspec/lib/mspec/expectations/should.rb
index ca06174..c1790e0 100644
--- a/spec/mspec/lib/mspec/expectations/should.rb
+++ b/spec/mspec/lib/mspec/expectations/should.rb
@@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/expectations/should.rb#L1
 class Object
   NO_MATCHER_GIVEN = Object.new
 
-  def should(matcher = NO_MATCHER_GIVEN)
+  def should(matcher = NO_MATCHER_GIVEN, &block)
     MSpec.expectation
     state = MSpec.current.state
     raise "should outside example" unless state
@@ -10,6 +10,9 @@ class Object https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/expectations/should.rb#L10
     if NO_MATCHER_GIVEN.equal?(matcher)
       SpecPositiveOperatorMatcher.new(self)
     else
+      # The block was given to #should syntactically, but it was intended for a matcher like #raise_error
+      m (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]