exception = assert_raise(___) do
my_global_method
end
- assert_match(/#{__ of arguments")}/, exception.message)
+ assert_match(/__/, exception.message)
exception = assert_raise(___) do
my_global_method(1,2,3)
end
- assert_match(/#{__ of arguments")}/, exception.message)
+ assert_match(/__/, exception.message)
end
# ------------------------------------------------------------------
exception = assert_raise(___(ArgumentError)) do
my_global_method
end
- assert_match(/#{__("wrong (number|#) of arguments")}/, exception.message)
+ #--
+ pattern = "wrong (number|#) of arguments"
+ #++
+ assert_match(/#{__(pattern)}/, exception.message)
exception = assert_raise(___(ArgumentError)) do
my_global_method(1,2,3)
end
- assert_match(/#{__("wrong (number|#) of arguments")}/, exception.message)
+ assert_match(/#{__(pattern)}/, exception.message)
end
# ------------------------------------------------------------------