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

ruby-changes:60994

From: Benoit <ko1@a...>
Date: Sun, 3 May 2020 19:29:44 +0900 (JST)
Subject: [ruby-changes:60994] 5aaa75e7c1 (master): Update to ruby/spec@032ee74

https://git.ruby-lang.org/ruby.git/commit/?id=5aaa75e7c1

From 5aaa75e7c1f4b7912c10ffdcb1cac581e20eda39 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Sun, 3 May 2020 12:28:29 +0200
Subject: Update to ruby/spec@032ee74


diff --git a/spec/ruby/command_line/error_message_spec.rb b/spec/ruby/command_line/error_message_spec.rb
index 5fee3ea..f3f7de4 100644
--- a/spec/ruby/command_line/error_message_spec.rb
+++ b/spec/ruby/command_line/error_message_spec.rb
@@ -3,9 +3,9 @@ require_relative '../spec_helper' https://github.com/ruby/ruby/blob/trunk/spec/ruby/command_line/error_message_spec.rb#L3
 describe "The error message caused by an exception" do
   it "is not printed to stdout" do
     out = ruby_exe("this_does_not_exist", args: "2> #{File::NULL}")
-    out.chomp.empty?.should == true
+    out.chomp.should.empty?
 
     out = ruby_exe("end #syntax error", args: "2> #{File::NULL}")
-    out.chomp.empty?.should == true
+    out.chomp.should.empty?
   end
 end
diff --git a/spec/ruby/core/argf/binmode_spec.rb b/spec/ruby/core/argf/binmode_spec.rb
index bdcc6aa..e083a30 100644
--- a/spec/ruby/core/argf/binmode_spec.rb
+++ b/spec/ruby/core/argf/binmode_spec.rb
@@ -34,7 +34,7 @@ describe "ARGF.binmode" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/argf/binmode_spec.rb#L34
   it "sets the file's encoding to BINARY" do
     argf [@bin_file, @file1] do
       @argf.binmode
-      @argf.binmode?.should == true
+      @argf.should.binmode?
       @argf.gets.encoding.should == Encoding::BINARY
       @argf.skip
       @argf.read.encoding.should == Encoding::BINARY
diff --git a/spec/ruby/core/array/any_spec.rb b/spec/ruby/core/array/any_spec.rb
index 2fa5353..09d949f 100644
--- a/spec/ruby/core/array/any_spec.rb
+++ b/spec/ruby/core/array/any_spec.rb
@@ -4,17 +4,17 @@ describe "Array#any?" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/any_spec.rb#L4
   describe 'with no block given (a default block of { |x| x } is implicit)' do
     it "is false if the array is empty" do
       empty_array = []
-      empty_array.any?.should == false
+      empty_array.should_not.any?
     end
 
     it "is false if the array is not empty, but all the members of the array are falsy" do
       falsy_array = [false, nil, false]
-      falsy_array.any?.should == false
+      falsy_array.should_not.any?
     end
 
     it "is true if the array has any truthy members" do
       not_empty_array = ['anything', nil]
-      not_empty_array.any?.should == true
+      not_empty_array.should.any?
     end
   end
 
diff --git a/spec/ruby/core/array/clear_spec.rb b/spec/ruby/core/array/clear_spec.rb
index 5c7a934..bddc672 100644
--- a/spec/ruby/core/array/clear_spec.rb
+++ b/spec/ruby/core/array/clear_spec.rb
@@ -16,7 +16,7 @@ describe "Array#clear" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/clear_spec.rb#L16
   it "leaves the Array empty" do
     a = [1]
     a.clear
-    a.empty?.should == true
+    a.should.empty?
     a.size.should == 0
   end
 
diff --git a/spec/ruby/core/array/clone_spec.rb b/spec/ruby/core/array/clone_spec.rb
index 803e746..e22a6c6 100644
--- a/spec/ruby/core/array/clone_spec.rb
+++ b/spec/ruby/core/array/clone_spec.rb
@@ -12,8 +12,8 @@ describe "Array#clone" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/clone_spec.rb#L12
     aa = a.clone
     bb = b.clone
 
-    aa.frozen?.should == true
-    bb.frozen?.should == false
+    aa.should.frozen?
+    bb.should_not.frozen?
   end
 
   it "copies singleton methods" do
diff --git a/spec/ruby/core/array/empty_spec.rb b/spec/ruby/core/array/empty_spec.rb
index b5f3e8e..f70b1b6 100644
--- a/spec/ruby/core/array/empty_spec.rb
+++ b/spec/ruby/core/array/empty_spec.rb
@@ -3,8 +3,8 @@ require_relative 'fixtures/classes' https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/empty_spec.rb#L3
 
 describe "Array#empty?" do
   it "returns true if the array has no elements" do
-    [].empty?.should == true
-    [1].empty?.should == false
-    [1, 2].empty?.should == false
+    [].should.empty?
+    [1].should_not.empty?
+    [1, 2].should_not.empty?
   end
 end
diff --git a/spec/ruby/core/array/frozen_spec.rb b/spec/ruby/core/array/frozen_spec.rb
index bb4b2b4..3ba54be 100644
--- a/spec/ruby/core/array/frozen_spec.rb
+++ b/spec/ruby/core/array/frozen_spec.rb
@@ -4,13 +4,13 @@ require_relative 'fixtures/classes' https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/frozen_spec.rb#L4
 describe "Array#frozen?" do
   it "returns true if array is frozen" do
     a = [1, 2, 3]
-    a.frozen?.should == false
+    a.should_not.frozen?
     a.freeze
-    a.frozen?.should == true
+    a.should.frozen?
   end
 
   it "returns false for an array being sorted by #sort" do
     a = [1, 2, 3]
-    a.sort { |x,y| a.frozen?.should == false; x <=> y }
+    a.sort { |x,y| a.should_not.frozen?; x <=> y }
   end
 end
diff --git a/spec/ruby/core/array/multiply_spec.rb b/spec/ruby/core/array/multiply_spec.rb
index 4060666..8ccec13 100644
--- a/spec/ruby/core/array/multiply_spec.rb
+++ b/spec/ruby/core/array/multiply_spec.rb
@@ -92,39 +92,39 @@ describe "Array#* with an integer" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/multiply_spec.rb#L92
     it "copies the taint status of the original array even if the passed count is 0" do
       ary = [1, 2, 3]
       ary.taint
-      (ary * 0).tainted?.should == true
+      (ary * 0).should.tainted?
     end
 
     it "copies the taint status of the original array even if the array is empty" do
       ary = []
       ary.taint
-      (ary * 3).tainted?.should == true
+      (ary * 3).should.tainted?
     end
 
     it "copies the taint status of the original array if the passed count is not 0" do
       ary = [1, 2, 3]
       ary.taint
-      (ary * 1).tainted?.should == true
-      (ary * 2).tainted?.should == true
+      (ary * 1).should.tainted?
+      (ary * 2).should.tainted?
     end
 
     it "copies the untrusted status of the original array even if the passed count is 0" do
       ary = [1, 2, 3]
       ary.untrust
-      (ary * 0).untrusted?.should == true
+      (ary * 0).should.untrusted?
     end
 
     it "copies the untrusted status of the original array even if the array is empty" do
       ary = []
       ary.untrust
-      (ary * 3).untrusted?.should == true
+      (ary * 3).should.untrusted?
     end
 
     it "copies the untrusted status of the original array if the passed count is not 0" do
       ary = [1, 2, 3]
       ary.untrust
-      (ary * 1).untrusted?.should == true
-      (ary * 2).untrusted?.should == true
+      (ary * 1).should.untrusted?
+      (ary * 2).should.untrusted?
     end
   end
 end
diff --git a/spec/ruby/core/array/shared/clone.rb b/spec/ruby/core/array/shared/clone.rb
index f6f581b..3c17b1f 100644
--- a/spec/ruby/core/array/shared/clone.rb
+++ b/spec/ruby/core/array/shared/clone.rb
@@ -26,8 +26,8 @@ describe :array_clone, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/shared/clone.rb#L26
       aa = a.send @method
       bb = b.send @method
 
-      aa.tainted?.should == true
-      bb.tainted?.should == false
+      aa.should.tainted?
+      bb.should_not.tainted?
     end
 
     it "copies untrusted status from the original" do
@@ -37,8 +37,8 @@ describe :array_clone, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/shared/clone.rb#L37
       aa = a.send @method
       bb = b.send @method
 
-      aa.untrusted?.should == true
-      bb.untrusted?.should == false
+      aa.should.untrusted?
+      bb.should_not.untrusted?
     end
   end
 end
diff --git a/spec/ruby/core/array/sort_spec.rb b/spec/ruby/core/array/sort_spec.rb
index 541f3a5..0c5ecdc 100644
--- a/spec/ruby/core/array/sort_spec.rb
+++ b/spec/ruby/core/array/sort_spec.rb
@@ -58,9 +58,9 @@ describe "Array#sort" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/sort_spec.rb#L58
     b = ArraySpecs::MockForCompared.new
     c = ArraySpecs::MockForCompared.new
 
-    ArraySpecs::MockForCompared.compared?.should == false
+    ArraySpecs::MockForCompared.should_not.compared?
     [a, b, c].sort.should == [c, b, a]
-    ArraySpecs::MockForCompared.compared?.should == true
+    ArraySpecs::MockForCompared.should.compared?
   end
 
   it "does not deal with exceptions raised by unimplemented or incorrect #<=>" do
@@ -104,7 +104,7 @@ describe "Array#sort" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/sort_spec.rb#L104
 
   it "does not freezes self during being sorted" do
     a = [1, 2, 3]
-    a.sort { |x,y| a.frozen?.should == false; x <=> y }
+    a.sort { |x,y| a.should_not.frozen?; x <=> y }
   end
 
   it "returns the specified value when it would break in the given block" do
@@ -207,9 +207,9 @@ describe "Array#sort!" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/sort_spec.rb#L207
     b = ArraySpecs::MockForCompared.new
     c = ArraySpecs::MockForCompared.new
 
-    ArraySpecs::MockForCompared.compared?.should == false
+    ArraySpecs::MockForCompared.should_not.compared?
     [a, b, c].sort!.should == [c, b, a]
-    ArraySpecs::MockForCompared.compared?.should == true
+    ArraySpecs::MockForCompared.should.compared?
   end
 
   it "does not call #<=> on contained objects when invoked with a block" do
diff --git a/spec/ruby/core/array/uniq_spec.rb b/spec/ruby/core/array/uniq_spec.rb
index 38e1878..fd60498 100644
--- a/spec/ruby/core/array/uniq_spec.rb
+++ b/spec/ruby/core/array/uniq_spec.rb
@@ -87,8 +87,8 @@ describe "Array#uniq" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/uniq_spec.rb#L87
       end
 
       a.uniq.should == a
-      a[0].tainted?.should == true
-      a[1].tainted?.should == true
+      a[0].should.tainted?
+      a[1].should.tainted?
 
       a = Array.new(2) do
         obj = mock('0')
@@ -106,8 +106,8 @@ describe "Array#uniq" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/array/uniq_spec.rb#L106
       end
 
       a.uniq.size.should == 1
-      a (... truncated)

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

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