summaryrefslogtreecommitdiff
path: root/spec/ruby/core/kernel/shared/sprintf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/kernel/shared/sprintf.rb')
-rw-r--r--spec/ruby/core/kernel/shared/sprintf.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/kernel/shared/sprintf.rb b/spec/ruby/core/kernel/shared/sprintf.rb
index 2b2c6c9b63..5ffe118035 100644
--- a/spec/ruby/core/kernel/shared/sprintf.rb
+++ b/spec/ruby/core/kernel/shared/sprintf.rb
@@ -306,13 +306,13 @@ describe :kernel_sprintf, shared: true do
it "raises TypeError if argument is not String or Integer and cannot be converted to them" do
-> {
@method.call("%c", [])
- }.should raise_error(TypeError, /no implicit conversion of Array into Integer/)
+ }.should raise_consistent_error(TypeError, /no implicit conversion of Array into Integer/)
end
it "raises TypeError if argument is nil" do
-> {
@method.call("%c", nil)
- }.should raise_error(TypeError, /no implicit conversion from nil to integer/)
+ }.should raise_consistent_error(TypeError, /no implicit conversion of nil into Integer/)
end
it "tries to convert argument to String with to_str" do
@@ -341,7 +341,7 @@ describe :kernel_sprintf, shared: true do
-> {
@method.call("%c", obj)
- }.should raise_error(TypeError, /can't convert BasicObject to String/)
+ }.should raise_consistent_error(TypeError, /can't convert BasicObject into String/)
end
it "raises TypeError if converting to Integer with to_int returns non-Integer" do
@@ -352,7 +352,7 @@ describe :kernel_sprintf, shared: true do
-> {
@method.call("%c", obj)
- }.should raise_error(TypeError, /can't convert BasicObject to Integer/)
+ }.should raise_consistent_error(TypeError, /can't convert BasicObject into Integer/)
end
end