diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-04-28 23:20:11 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-04-28 23:20:11 +0200 |
commit | 79671ec57e59091260a0bc3d40a31d31d9c72a94 (patch) | |
tree | 2f59a8727b8f63f9e79d50352fa4f78a7cc00234 /spec/ruby/core/time | |
parent | 994833085ae06afbe94d30ab183d80e0234fbe14 (diff) | |
download | ruby-79671ec57e59091260a0bc3d40a31d31d9c72a94.tar.gz |
Update to ruby/spec@7de852d
Diffstat (limited to 'spec/ruby/core/time')
-rw-r--r-- | spec/ruby/core/time/_load_spec.rb | 12 | ||||
-rw-r--r-- | spec/ruby/core/time/shared/inspect.rb | 6 |
2 files changed, 7 insertions, 11 deletions
diff --git a/spec/ruby/core/time/_load_spec.rb b/spec/ruby/core/time/_load_spec.rb index 5f6275d46c..152934370f 100644 --- a/spec/ruby/core/time/_load_spec.rb +++ b/spec/ruby/core/time/_load_spec.rb @@ -43,12 +43,10 @@ describe "Time._load" do t.to_s.should == "2010-10-22 16:57:48 UTC" end - with_feature :encoding do - it "treats the data as binary data" do - data = "\x04\bu:\tTime\r\fM\x1C\xC0\x00\x00\xD0\xBE" - data.force_encoding Encoding::UTF_8 - t = Marshal.load(data) - t.to_s.should == "2013-04-08 12:47:45 UTC" - end + it "treats the data as binary data" do + data = "\x04\bu:\tTime\r\fM\x1C\xC0\x00\x00\xD0\xBE" + data.force_encoding Encoding::UTF_8 + t = Marshal.load(data) + t.to_s.should == "2013-04-08 12:47:45 UTC" end end diff --git a/spec/ruby/core/time/shared/inspect.rb b/spec/ruby/core/time/shared/inspect.rb index c707382a6e..4133671924 100644 --- a/spec/ruby/core/time/shared/inspect.rb +++ b/spec/ruby/core/time/shared/inspect.rb @@ -15,9 +15,7 @@ describe :inspect, shared: true do Time.new(2000, 1, 1, 20, 15, 01, 3600).send(@method).should == "2000-01-01 20:15:01 +0100" end - with_feature :encoding do - it "returns a US-ASCII encoded string" do - Time.now.send(@method).encoding.should equal(Encoding::US_ASCII) - end + it "returns a US-ASCII encoded string" do + Time.now.send(@method).encoding.should equal(Encoding::US_ASCII) end end |