Note that there are some explanatory texts on larger screens.

plurals
  1. POTesting view on Rails 4 mountable engine with Rspec
    primarykey
    data
    text
    <p>i'm working on a mountable engine based on rails4 with rspec testing framework. I built a simply app through 'r g scaffold post title content'. Everything worked fine except view testing. When i executed rake app:spec:views, it always say:</p> <blockquote> <p>" Failure/Error: render ActionView::MissingTemplate: Missing template posts/indexwith {:locale=>[:en], :formats=>[:html, :text, :js, :css, :ics, :csv, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip], :handlers=>[:erb, :builder, :raw, :ruby]}. Searched in: * "/projects/_plugins/blorgh4m_rspect/spec/dummy/app/views" * "/projects/_plugins/blorgh4m_rspect/app/views" "</p> </blockquote> <p>so i change "render" to "render template: "blorgh4m_rspect/posts/show", the error became </p> <blockquote> <p>" Failure/Error: render template: "blorgh4m_rspect/posts/index" ActionView::Template::Error: undefined method <code>post_path' for #&lt;#&lt;Class:0x0000000427cb40&gt;:0x00000004ff97f0&gt; # ./app/views/blorgh4m_rspect/posts/index.html.erb:21:in</code>block in <strong>home_elbbub</strong>_works_projects__plugins_blorgh_m_rspect_app_views_blorgh_m_rspect_posts_index_html_erb__569958834415291959_42058840' # ./app/views/blorgh4m_rspect/posts/index.html.erb:15:in <code>each' # ./app/views/blorgh4m_rspect/posts/index.html.erb:15:in</code><strong>home_elbbub</strong>_works_projects__plugins_blorgh_m_rspect_app_views_blorgh_m_rspect_posts_index_html_erb__569958834415291959_42058840' # ./spec/views/blorgh4m_rspect/posts/index.html.erb_spec.rb:20:in `block (2 levels) in ' "</p> </blockquote> <p>it looks like all the routes path helpers are invalid. </p> <p>Has anybody met this kind of case? and do you have any idea about it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload