summaryrefslogtreecommitdiff
path: root/spec/ruby/library/date
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-01 15:41:50 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-01 15:41:50 +0000
commit4d7b0b9112f2adf9e87ef75056f930bf7c1f3dc4 (patch)
tree8d712e18a619a9720d181d0d44e8cc2474ff31ee /spec/ruby/library/date
parent821d9a2d30f2e0d3f9009dc001b4b49aaa63c66e (diff)
downloadruby-4d7b0b9112f2adf9e87ef75056f930bf7c1f3dc4.tar.gz
Update to ruby/spec@bacedc5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/library/date')
-rw-r--r--spec/ruby/library/date/constants_spec.rb8
-rw-r--r--spec/ruby/library/date/minus_month_spec.rb9
2 files changed, 6 insertions, 11 deletions
diff --git a/spec/ruby/library/date/constants_spec.rb b/spec/ruby/library/date/constants_spec.rb
index 8e564fe665..ae343f07ec 100644
--- a/spec/ruby/library/date/constants_spec.rb
+++ b/spec/ruby/library/date/constants_spec.rb
@@ -34,9 +34,13 @@ describe "Date constants" do
it "freezes MONTHNAMES, DAYNAMES, ABBR_MONTHNAMES, ABBR_DAYSNAMES" do
[Date::MONTHNAMES, Date::DAYNAMES, Date::ABBR_MONTHNAMES, Date::ABBR_DAYNAMES].each do |ary|
- lambda { ary << "Unknown" }.should raise_error
+ lambda {
+ ary << "Unknown"
+ }.should raise_error(RuntimeError, /frozen/)
ary.compact.each do |name|
- lambda { name << "modified" }.should raise_error
+ lambda {
+ name << "modified"
+ }.should raise_error(RuntimeError, /frozen/)
end
end
end
diff --git a/spec/ruby/library/date/minus_month_spec.rb b/spec/ruby/library/date/minus_month_spec.rb
index fbe5cb8593..51befcc6d4 100644
--- a/spec/ruby/library/date/minus_month_spec.rb
+++ b/spec/ruby/library/date/minus_month_spec.rb
@@ -13,15 +13,6 @@ describe "Date#<<" do
d.should == Date.civil(2008, 2, 29)
end
- ruby_version_is ""..."2.3" do
- it "raises an error on non numeric parameters" do
- lambda { Date.civil(2007,2,27) << :hello }.should raise_error
- lambda { Date.civil(2007,2,27) << "hello" }.should raise_error
- lambda { Date.civil(2007,2,27) << Date.new }.should raise_error
- lambda { Date.civil(2007,2,27) << Object.new }.should raise_error
- end
- end
-
ruby_version_is "2.3" do
it "raises an error on non numeric parameters" do
lambda { Date.civil(2007,2,27) << :hello }.should raise_error(TypeError)