在rspec视图规范中渲染activeadmin视图?

时间:2014-09-18 12:34:32

标签: ruby-on-rails ruby ruby-on-rails-4 rspec activeadmin

我在渲染有效的管理视图时遇到问题

RSpec.describe "active_admin/resource/new" do
  it "is just simple test" do
    render
 end    
end

但它返回

Failure/Error: 
   render# template: 'active_admin/resource/new.html.arb'
     ActionView::Template::Error:
       undefined method `renderer_for' for :Arbre::Context
     # ./spec/views/admin/form_spec.rb:7:in `block (2 levels) in <top (required)>'

如何正确呈现它以便我可以对其内容进行一些测试

1 个答案:

答案 0 :(得分:0)