aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/array/shared
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-27 16:12:47 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-27 16:12:47 +0000
commita34db218ade33b79e7404488db5a15bad2841c25 (patch)
tree2ed22ad149cd75e36d9aabbe29b32e96c27fa3a6 /spec/ruby/core/array/shared
parent0f989b87a06563add3fdeb9cda983492e8a420af (diff)
downloadruby-a34db218ade33b79e7404488db5a15bad2841c25.tar.gz
Update to ruby/spec@0fe33ac
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/array/shared')
-rw-r--r--spec/ruby/core/array/shared/collect.rb16
-rw-r--r--spec/ruby/core/array/shared/keep_if.rb8
-rw-r--r--spec/ruby/core/array/shared/push.rb6
-rw-r--r--spec/ruby/core/array/shared/replace.rb4
-rw-r--r--spec/ruby/core/array/shared/unshift.rb8
5 files changed, 21 insertions, 21 deletions
diff --git a/spec/ruby/core/array/shared/collect.rb b/spec/ruby/core/array/shared/collect.rb
index f6bcfd8904..2c75675b9d 100644
--- a/spec/ruby/core/array/shared/collect.rb
+++ b/spec/ruby/core/array/shared/collect.rb
@@ -110,22 +110,22 @@ describe :array_collect_b, shared: true do
end
describe "when frozen" do
- it "raises a RuntimeError" do
- lambda { ArraySpecs.frozen_array.send(@method) {} }.should raise_error(RuntimeError)
+ it "raises a #{frozen_error_class}" do
+ lambda { ArraySpecs.frozen_array.send(@method) {} }.should raise_error(frozen_error_class)
end
- it "raises a RuntimeError when empty" do
- lambda { ArraySpecs.empty_frozen_array.send(@method) {} }.should raise_error(RuntimeError)
+ it "raises a #{frozen_error_class} when empty" do
+ lambda { ArraySpecs.empty_frozen_array.send(@method) {} }.should raise_error(frozen_error_class)
end
- it "raises a RuntimeError when calling #each on the returned Enumerator" do
+ it "raises a #{frozen_error_class} when calling #each on the returned Enumerator" do
enumerator = ArraySpecs.frozen_array.send(@method)
- lambda { enumerator.each {|x| x } }.should raise_error(RuntimeError)
+ lambda { enumerator.each {|x| x } }.should raise_error(frozen_error_class)
end
- it "raises a RuntimeError when calling #each on the returned Enumerator when empty" do
+ it "raises a #{frozen_error_class} when calling #each on the returned Enumerator when empty" do
enumerator = ArraySpecs.empty_frozen_array.send(@method)
- lambda { enumerator.each {|x| x } }.should raise_error(RuntimeError)
+ lambda { enumerator.each {|x| x } }.should raise_error(frozen_error_class)
end
end
diff --git a/spec/ruby/core/array/shared/keep_if.rb b/spec/ruby/core/array/shared/keep_if.rb
index 581ba31d1b..0f65d060d8 100644
--- a/spec/ruby/core/array/shared/keep_if.rb
+++ b/spec/ruby/core/array/shared/keep_if.rb
@@ -41,8 +41,8 @@ describe :keep_if, shared: true do
@frozen.should == @origin
end
- it "raises a RuntimeError" do
- lambda { @frozen.send(@method) { true } }.should raise_error(RuntimeError)
+ it "raises a #{frozen_error_class}" do
+ lambda { @frozen.send(@method) { true } }.should raise_error(frozen_error_class)
end
end
@@ -52,8 +52,8 @@ describe :keep_if, shared: true do
@frozen.should == @origin
end
- it "raises a RuntimeError" do
- lambda { @frozen.send(@method) { false } }.should raise_error(RuntimeError)
+ it "raises a #{frozen_error_class}" do
+ lambda { @frozen.send(@method) { false } }.should raise_error(frozen_error_class)
end
end
end
diff --git a/spec/ruby/core/array/shared/push.rb b/spec/ruby/core/array/shared/push.rb
index 5951b71a19..effa632890 100644
--- a/spec/ruby/core/array/shared/push.rb
+++ b/spec/ruby/core/array/shared/push.rb
@@ -26,8 +26,8 @@ describe :array_push, shared: true do
array.send(@method, :last).should == [1, 'two', 3.0, array, array, array, array, array, :last]
end
- it "raises a RuntimeError on a frozen array" do
- lambda { ArraySpecs.frozen_array.send(@method, 1) }.should raise_error(RuntimeError)
- lambda { ArraySpecs.frozen_array.send(@method) }.should raise_error(RuntimeError)
+ it "raises a #{frozen_error_class} on a frozen array" do
+ lambda { ArraySpecs.frozen_array.send(@method, 1) }.should raise_error(frozen_error_class)
+ lambda { ArraySpecs.frozen_array.send(@method) }.should raise_error(frozen_error_class)
end
end
diff --git a/spec/ruby/core/array/shared/replace.rb b/spec/ruby/core/array/shared/replace.rb
index 8442d9a841..b8dae8d33e 100644
--- a/spec/ruby/core/array/shared/replace.rb
+++ b/spec/ruby/core/array/shared/replace.rb
@@ -52,9 +52,9 @@ describe :array_replace, shared: true do
[].send(@method, ArraySpecs::ToAryArray[5, 6, 7]).should == [5, 6, 7]
end
- it "raises a RuntimeError on a frozen array" do
+ it "raises a #{frozen_error_class} on a frozen array" do
lambda {
ArraySpecs.frozen_array.send(@method, ArraySpecs.frozen_array)
- }.should raise_error(RuntimeError)
+ }.should raise_error(frozen_error_class)
end
end
diff --git a/spec/ruby/core/array/shared/unshift.rb b/spec/ruby/core/array/shared/unshift.rb
index 367bab4166..d7464cdaca 100644
--- a/spec/ruby/core/array/shared/unshift.rb
+++ b/spec/ruby/core/array/shared/unshift.rb
@@ -35,12 +35,12 @@ describe :array_unshift, shared: true do
array[0..5].should == [:new, 1, 'two', 3.0, array, array]
end
- it "raises a RuntimeError on a frozen array when the array is modified" do
- lambda { ArraySpecs.frozen_array.send(@method, 1) }.should raise_error(RuntimeError)
+ it "raises a #{frozen_error_class} on a frozen array when the array is modified" do
+ lambda { ArraySpecs.frozen_array.send(@method, 1) }.should raise_error(frozen_error_class)
end
# see [ruby-core:23666]
- it "raises a RuntimeError on a frozen array when the array would not be modified" do
- lambda { ArraySpecs.frozen_array.send(@method) }.should raise_error(RuntimeError)
+ it "raises a #{frozen_error_class} on a frozen array when the array would not be modified" do
+ lambda { ArraySpecs.frozen_array.send(@method) }.should raise_error(frozen_error_class)
end
end