0
RSpec-rails视图示例中的rendered
方法用于获取渲染的视图模板。RSpec导轨。渲染方法
例如:
describe 'example/show.html.haml' do
it 'displays \'ok!\'' do
render
rendered.should have_content('ok!')
end
end
我在寻找这种方法的根源困难。它从何而来?
谢谢。
Debian GNU/Linux 6.0.1;
Ruby 1.9.2;
Ruby on Rails 3.1.0.rc4;
RSpec-rails 2.6.1。