提交 49295e72 编写于 作者: C Carlos Antonio da Silva

Merge pull request #8461 from frodsan/fix_assert_method_generators

Fix #assert_instance_method to also assert indented methods
......@@ -163,7 +163,7 @@ def assert_class_method(method, content, &block)
# end
# end
def assert_instance_method(method, content)
assert content =~ /def #{method}(\(.+\))?(.*?)\n end/m, "Expected to have method #{method}"
assert content =~ /def #{method}(\(.+\))?(.*?)\n\s+end/m, "Expected to have method #{method}"
yield $2.strip if block_given?
end
alias :assert_method :assert_instance_method
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册