summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-05-03 12:28:29 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-05-03 12:28:29 +0200
commit5aaa75e7c1f4b7912c10ffdcb1cac581e20eda39 (patch)
treee1694f5a4a5558884b1b8f3890b186793e5e982f /spec/ruby/core/time
parentf646d20aaeb8f02bcd3d0c5c3f5a372da654502a (diff)
Update to ruby/spec@032ee74
Diffstat (limited to 'spec/ruby/core/time')
-rw-r--r--spec/ruby/core/time/_dump_spec.rb4
-rw-r--r--spec/ruby/core/time/at_spec.rb6
-rw-r--r--spec/ruby/core/time/dup_spec.rb4
-rw-r--r--spec/ruby/core/time/friday_spec.rb4
-rw-r--r--spec/ruby/core/time/gmt_spec.rb4
-rw-r--r--spec/ruby/core/time/minus_spec.rb4
-rw-r--r--spec/ruby/core/time/monday_spec.rb4
-rw-r--r--spec/ruby/core/time/new_spec.rb2
-rw-r--r--spec/ruby/core/time/plus_spec.rb4
-rw-r--r--spec/ruby/core/time/saturday_spec.rb4
-rw-r--r--spec/ruby/core/time/sunday_spec.rb4
-rw-r--r--spec/ruby/core/time/thursday_spec.rb4
-rw-r--r--spec/ruby/core/time/tuesday_spec.rb4
-rw-r--r--spec/ruby/core/time/utc_spec.rb2
-rw-r--r--spec/ruby/core/time/wednesday_spec.rb4
15 files changed, 29 insertions, 29 deletions
diff --git a/spec/ruby/core/time/_dump_spec.rb b/spec/ruby/core/time/_dump_spec.rb
index 6941a1531f..4dc1c43cd2 100644
--- a/spec/ruby/core/time/_dump_spec.rb
+++ b/spec/ruby/core/time/_dump_spec.rb
@@ -15,11 +15,11 @@ describe "Time#_dump" do
# http://redmine.ruby-lang.org/issues/show/627
it "preserves the GMT flag" do
- @t.gmt?.should == true
+ @t.should.gmt?
dump = @t.send(:_dump).unpack("VV").first
((dump >> 30) & 0x1).should == 1
- @local.gmt?.should == false
+ @local.should_not.gmt?
dump = @local.send(:_dump).unpack("VV").first
((dump >> 30) & 0x1).should == 0
end
diff --git a/spec/ruby/core/time/at_spec.rb b/spec/ruby/core/time/at_spec.rb
index 28a3d7b34c..6f4d83f9ad 100644
--- a/spec/ruby/core/time/at_spec.rb
+++ b/spec/ruby/core/time/at_spec.rb
@@ -14,7 +14,7 @@ describe "Time.at" do
end
it "returns a non-UTC Time" do
- Time.at(1184027924).utc?.should == false
+ Time.at(1184027924).should_not.utc?
end
it "returns a subclass instance on a Time subclass" do
@@ -54,12 +54,12 @@ describe "Time.at" do
it "returns a UTC time if the argument is UTC" do
t = Time.now.getgm
- Time.at(t).utc?.should == true
+ Time.at(t).should.utc?
end
it "returns a non-UTC time if the argument is non-UTC" do
t = Time.now
- Time.at(t).utc?.should == false
+ Time.at(t).should_not.utc?
end
it "returns a subclass instance" do
diff --git a/spec/ruby/core/time/dup_spec.rb b/spec/ruby/core/time/dup_spec.rb
index ee2ff7dbba..5d6621beaa 100644
--- a/spec/ruby/core/time/dup_spec.rb
+++ b/spec/ruby/core/time/dup_spec.rb
@@ -7,7 +7,7 @@ describe "Time#dup" do
end
it "copies the gmt state flag" do
- Time.now.gmtime.dup.gmt?.should == true
+ Time.now.gmtime.dup.should.gmt?
end
it "returns an independent Time object" do
@@ -15,7 +15,7 @@ describe "Time#dup" do
t2 = t.dup
t.gmtime
- t2.gmt?.should == false
+ t2.should_not.gmt?
end
it "returns a subclass instance" do
diff --git a/spec/ruby/core/time/friday_spec.rb b/spec/ruby/core/time/friday_spec.rb
index 27f9e1dbe5..8bee7f7558 100644
--- a/spec/ruby/core/time/friday_spec.rb
+++ b/spec/ruby/core/time/friday_spec.rb
@@ -2,10 +2,10 @@ require_relative '../../spec_helper'
describe "Time#friday?" do
it "returns true if time represents Friday" do
- Time.local(2000, 1, 7).friday?.should == true
+ Time.local(2000, 1, 7).should.friday?
end
it "returns false if time doesn't represent Friday" do
- Time.local(2000, 1, 1).friday?.should == false
+ Time.local(2000, 1, 1).should_not.friday?
end
end
diff --git a/spec/ruby/core/time/gmt_spec.rb b/spec/ruby/core/time/gmt_spec.rb
index 7e85749d5b..840f59e0e8 100644
--- a/spec/ruby/core/time/gmt_spec.rb
+++ b/spec/ruby/core/time/gmt_spec.rb
@@ -2,7 +2,7 @@ require_relative '../../spec_helper'
describe "Time#gmt?" do
it "returns true if time represents a time in UTC (GMT)" do
- Time.now.gmt?.should == false
- Time.now.gmtime.gmt?.should == true
+ Time.now.should_not.gmt?
+ Time.now.gmtime.should.gmt?
end
end
diff --git a/spec/ruby/core/time/minus_spec.rb b/spec/ruby/core/time/minus_spec.rb
index 65613d11e9..995dac8462 100644
--- a/spec/ruby/core/time/minus_spec.rb
+++ b/spec/ruby/core/time/minus_spec.rb
@@ -79,11 +79,11 @@ describe "Time#-" do
end
it "returns a UTC time if self is UTC" do
- (Time.utc(2012) - 10).utc?.should == true
+ (Time.utc(2012) - 10).should.utc?
end
it "returns a non-UTC time if self is non-UTC" do
- (Time.local(2012) - 10).utc?.should == false
+ (Time.local(2012) - 10).should_not.utc?
end
it "returns a time with the same fixed offset as self" do
diff --git a/spec/ruby/core/time/monday_spec.rb b/spec/ruby/core/time/monday_spec.rb
index c5c43a5c3e..47ecaeb1db 100644
--- a/spec/ruby/core/time/monday_spec.rb
+++ b/spec/ruby/core/time/monday_spec.rb
@@ -2,10 +2,10 @@ require_relative '../../spec_helper'
describe "Time#monday?" do
it "returns true if time represents Monday" do
- Time.local(2000, 1, 3).monday?.should == true
+ Time.local(2000, 1, 3).should.monday?
end
it "returns false if time doesn't represent Monday" do
- Time.local(2000, 1, 1).monday?.should == false
+ Time.local(2000, 1, 1).should_not.monday?
end
end
diff --git a/spec/ruby/core/time/new_spec.rb b/spec/ruby/core/time/new_spec.rb
index a5cfa2a7df..3cafd46db7 100644
--- a/spec/ruby/core/time/new_spec.rb
+++ b/spec/ruby/core/time/new_spec.rb
@@ -15,7 +15,7 @@ end
describe "Time.new with a utc_offset argument" do
it "returns a non-UTC time" do
- Time.new(2000, 1, 1, 0, 0, 0, 0).utc?.should == false
+ Time.new(2000, 1, 1, 0, 0, 0, 0).should_not.utc?
end
it "returns a Time with a UTC offset of the specified number of Integer seconds" do
diff --git a/spec/ruby/core/time/plus_spec.rb b/spec/ruby/core/time/plus_spec.rb
index 6c29baf124..c59d9a32bb 100644
--- a/spec/ruby/core/time/plus_spec.rb
+++ b/spec/ruby/core/time/plus_spec.rb
@@ -37,11 +37,11 @@ describe "Time#+" do
end
it "returns a UTC time if self is UTC" do
- (Time.utc(2012) + 10).utc?.should == true
+ (Time.utc(2012) + 10).should.utc?
end
it "returns a non-UTC time if self is non-UTC" do
- (Time.local(2012) + 10).utc?.should == false
+ (Time.local(2012) + 10).should_not.utc?
end
it "returns a time with the same fixed offset as self" do
diff --git a/spec/ruby/core/time/saturday_spec.rb b/spec/ruby/core/time/saturday_spec.rb
index 60ffea4198..0e51407366 100644
--- a/spec/ruby/core/time/saturday_spec.rb
+++ b/spec/ruby/core/time/saturday_spec.rb
@@ -2,10 +2,10 @@ require_relative '../../spec_helper'
describe "Time#saturday?" do
it "returns true if time represents Saturday" do
- Time.local(2000, 1, 1).saturday?.should == true
+ Time.local(2000, 1, 1).should.saturday?
end
it "returns false if time doesn't represent Saturday" do
- Time.local(2000, 1, 2).saturday?.should == false
+ Time.local(2000, 1, 2).should_not.saturday?
end
end
diff --git a/spec/ruby/core/time/sunday_spec.rb b/spec/ruby/core/time/sunday_spec.rb
index 2285583579..0d46421132 100644
--- a/spec/ruby/core/time/sunday_spec.rb
+++ b/spec/ruby/core/time/sunday_spec.rb
@@ -2,10 +2,10 @@ require_relative '../../spec_helper'
describe "Time#sunday?" do
it "returns true if time represents Sunday" do
- Time.local(2000, 1, 2).sunday?.should == true
+ Time.local(2000, 1, 2).should.sunday?
end
it "returns false if time doesn't represent Sunday" do
- Time.local(2000, 1, 1).sunday?.should == false
+ Time.local(2000, 1, 1).should_not.sunday?
end
end
diff --git a/spec/ruby/core/time/thursday_spec.rb b/spec/ruby/core/time/thursday_spec.rb
index c82d517519..c11e79d2fa 100644
--- a/spec/ruby/core/time/thursday_spec.rb
+++ b/spec/ruby/core/time/thursday_spec.rb
@@ -2,10 +2,10 @@ require_relative '../../spec_helper'
describe "Time#thursday?" do
it "returns true if time represents Thursday" do
- Time.local(2000, 1, 6).thursday?.should == true
+ Time.local(2000, 1, 6).should.thursday?
end
it "returns false if time doesn't represent Thursday" do
- Time.local(2000, 1, 1).thursday?.should == false
+ Time.local(2000, 1, 1).should_not.thursday?
end
end
diff --git a/spec/ruby/core/time/tuesday_spec.rb b/spec/ruby/core/time/tuesday_spec.rb
index 7abbdc92c0..0e7b9e7506 100644
--- a/spec/ruby/core/time/tuesday_spec.rb
+++ b/spec/ruby/core/time/tuesday_spec.rb
@@ -2,10 +2,10 @@ require_relative '../../spec_helper'
describe "Time#tuesday?" do
it "returns true if time represents Tuesday" do
- Time.local(2000, 1, 4).tuesday?.should == true
+ Time.local(2000, 1, 4).should.tuesday?
end
it "returns false if time doesn't represent Tuesday" do
- Time.local(2000, 1, 1).tuesday?.should == false
+ Time.local(2000, 1, 1).should_not.tuesday?
end
end
diff --git a/spec/ruby/core/time/utc_spec.rb b/spec/ruby/core/time/utc_spec.rb
index 5074c8d54d..74c17a93d1 100644
--- a/spec/ruby/core/time/utc_spec.rb
+++ b/spec/ruby/core/time/utc_spec.rb
@@ -5,7 +5,7 @@ require_relative 'shared/time_params'
describe "Time#utc?" do
it "returns true if time represents a time in UTC (GMT)" do
- Time.now.utc?.should == false
+ Time.now.should_not.utc?
end
end
diff --git a/spec/ruby/core/time/wednesday_spec.rb b/spec/ruby/core/time/wednesday_spec.rb
index 6a52c3577b..cc686681d7 100644
--- a/spec/ruby/core/time/wednesday_spec.rb
+++ b/spec/ruby/core/time/wednesday_spec.rb
@@ -2,10 +2,10 @@ require_relative '../../spec_helper'
describe "Time#wednesday?" do
it "returns true if time represents Wednesday" do
- Time.local(2000, 1, 5).wednesday?.should == true
+ Time.local(2000, 1, 5).should.wednesday?
end
it "returns false if time doesn't represent Wednesday" do
- Time.local(2000, 1, 1).wednesday?.should == false
+ Time.local(2000, 1, 1).should_not.wednesday?
end
end