summaryrefslogtreecommitdiff
path: root/spec/ruby/library/date/strftime_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/date/strftime_spec.rb')
-rw-r--r--spec/ruby/library/date/strftime_spec.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/ruby/library/date/strftime_spec.rb b/spec/ruby/library/date/strftime_spec.rb
index 81bb162ff7..1b93a8d1b2 100644
--- a/spec/ruby/library/date/strftime_spec.rb
+++ b/spec/ruby/library/date/strftime_spec.rb
@@ -1,9 +1,11 @@
+require_relative "../../spec_helper"
require 'date'
-require File.expand_path('../../../shared/time/strftime_for_date', __FILE__)
+require_relative '../../shared/time/strftime_for_date'
+date_version = defined?(Date::VERSION) ? Date::VERSION : '3.1.0'
describe "Date#strftime" do
before :all do
- @new_date = lambda { |y,m,d| Date.civil(y,m,d) }
+ @new_date = -> y, m, d { Date.civil(y,m,d) }
@date = Date.civil(2000, 4, 9)
end
@@ -21,10 +23,9 @@ describe "Date#strftime" do
@date.strftime("%Z").should == "+00:00"
end
- # %v is %e-%b-%Y for Date/DateTime
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')
+ @date.strftime("%v").should == " 9-APR-2000"
+ @date.strftime("%v").should != @date.strftime('%e-%b-%Y')
end
# additional conversion specifiers only in Date/DateTime