<%= link_to post.title, post_path(post) %>
<%= post.public %>
<%= truncate markdown(post.content), length: 400, omission: " ......" %>
我正在进行一些Specs测试,我正在尝试了解“必须”功能以及它的功能。
我无法在规格来源的任何地方找到它的声明或实现,我试图了解它的功能。
以下是它的一些示例用法:
"hello world".size must be equalTo(11) "hello world" must be matching("h.* w.*") stack.push(11) must throwAn[Error]
在我看来,“必须”以一个函数作为参数,但我想知道“必须”的实际签名,以及它对它的论点所做的事情。
任何人都可以将我指向正确的方向吗?
谢谢!
I'm working with some Specs tests and I'm trying to understand what the "must" function is, and what it does.
I am unable to find its declaration or implementation anywhere in the specs source, and I'm trying to understand what it does.
Here are some example usages of it:
"hello world".size must be equalTo(11) "hello world" must be matching("h.* w.*") stack.push(11) must throwAn[Error]
It looks to me like "must" takes a function as an argument, but I'd like to know the actual signature of "must", and what it does with its argument.
Can anyone point me in the right direction?
Thanks!
原文:https://stackoverflow.com/questions/5409615
你有其他的虚拟主机与DOC_ROOT / var / www
You have other virtualhost with DOC_ROOT /var/www
<%= truncate markdown(post.content), length: 400, omission: " ......" %>