最近写了段烂代码
if Rails.env=='test' || Rails.env='cucumber'
结果掉坑里了,痛定思痛后总结了一下,发现自己潜意识里是把 Rails.env 看作一个不变量的,既然如此,我觉得应该有个机制限制它的变化,所以提了一个pull request
有人写了 comment
That said, currently, this has no tests, which would be needed in order to get it accepted as well. Or documentation. But I wouldn't bother writing stuff until someone from core actually reviews this.
我补充了测试用例,不过我的 E 文太烂了,不知道有没有人可以补充一下文档之类的?