mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-17 07:53:20 -04:00
Fixed bug where some koans were not generated properly.
This commit is contained in:
@@ -36,12 +36,12 @@ class AboutMethods < EdgeCase::Koan
|
|||||||
exception = assert_raise(___) do
|
exception = assert_raise(___) do
|
||||||
my_global_method
|
my_global_method
|
||||||
end
|
end
|
||||||
assert_match(/#{__ of arguments")}/, exception.message)
|
assert_match(/__/, exception.message)
|
||||||
|
|
||||||
exception = assert_raise(___) do
|
exception = assert_raise(___) do
|
||||||
my_global_method(1,2,3)
|
my_global_method(1,2,3)
|
||||||
end
|
end
|
||||||
assert_match(/#{__ of arguments")}/, exception.message)
|
assert_match(/__/, exception.message)
|
||||||
end
|
end
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|||||||
@@ -43,12 +43,15 @@ class AboutMethods < EdgeCase::Koan
|
|||||||
exception = assert_raise(___(ArgumentError)) do
|
exception = assert_raise(___(ArgumentError)) do
|
||||||
my_global_method
|
my_global_method
|
||||||
end
|
end
|
||||||
assert_match(/#{__("wrong (number|#) of arguments")}/, exception.message)
|
#--
|
||||||
|
pattern = "wrong (number|#) of arguments"
|
||||||
|
#++
|
||||||
|
assert_match(/#{__(pattern)}/, exception.message)
|
||||||
|
|
||||||
exception = assert_raise(___(ArgumentError)) do
|
exception = assert_raise(___(ArgumentError)) do
|
||||||
my_global_method(1,2,3)
|
my_global_method(1,2,3)
|
||||||
end
|
end
|
||||||
assert_match(/#{__("wrong (number|#) of arguments")}/, exception.message)
|
assert_match(/#{__(pattern)}/, exception.message)
|
||||||
end
|
end
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user