summaryrefslogtreecommitdiff
path: root/spec/ruby/library/date/strftime_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2023-09-04 16:07:46 +0200
committerBenoit Daloze <[email protected]>2023-09-04 16:07:46 +0200
commit0b5c61494eb30c8c1867b9e6a52ad678e3f47901 (patch)
tree30ca3af5dadae196c39dae8c7e35c28b0537dd4a /spec/ruby/library/date/strftime_spec.rb
parent3504f928dfb60b763e7b66149ca45cdbb45df78a (diff)
Update to ruby/spec@96d1072
Diffstat (limited to 'spec/ruby/library/date/strftime_spec.rb')
-rw-r--r--spec/ruby/library/date/strftime_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/library/date/strftime_spec.rb b/spec/ruby/library/date/strftime_spec.rb
index fc6c1dae8d..b5232a2073 100644
--- a/spec/ruby/library/date/strftime_spec.rb
+++ b/spec/ruby/library/date/strftime_spec.rb
@@ -1,6 +1,7 @@
require_relative "../../spec_helper"
require 'date'
require_relative '../../shared/time/strftime_for_date'
+date_version = defined?(Date::VERSION) ? Date::VERSION : '3.1.0'
describe "Date#strftime" do
before :all do
@@ -23,14 +24,14 @@ describe "Date#strftime" do
end
# %v is %e-%b-%Y for Date/DateTime
- version_is Date::VERSION, ""..."3.2" do #ruby_version_is ""..."3.1" do
+ version_is date_version, ""..."3.2" do #ruby_version_is ""..."3.1" do
it "should be able to show the commercial week" do
@date.strftime("%v").should == " 9-Apr-2000"
@date.strftime("%v").should == @date.strftime('%e-%b-%Y')
end
end
- version_is Date::VERSION, "3.2" do #ruby_version_is "3.1" do
+ version_is date_version, "3.2" do #ruby_version_is "3.1" do
it "should be able to show the commercial week" do
@date.strftime("%v").should == " 9-APR-2000"
@date.strftime("%v").should != @date.strftime('%e-%b-%Y')