【发布时间】:2010-05-02 15:46:50
【问题描述】:
我想说明我的应用程序布局视图会打印出 Flash 通知这一事实。但是下面的代码没有运行,flash 方法在视图规范中不存在(与它完美工作的控制器规范相反):
describe 'layouts/application' do
it "renders flash notices" do
flash[:notice] = "This is a notice!"
render
response.should contain "This is a notice!"
end
end
我的代码是错误的还是 Rspec 2 中的“尚未实现的功能”?我在 Git 上的 master 分支上使用 Rails3 和 Rspec2。
谢谢!
【问题讨论】:
标签: ruby-on-rails rspec