ruby on rails - How to test prepend_view_path method using rspec -


the controller has differents views based on current site. code this:

class sitescontroller < applicationcontroller   prepend_view_path :prepend_templates_path    private   def get_views_path     "public/assets/#{current_site.slug}/views"   end end 

how test rails searching inside "public/assets/#{current_site.slug}/views" folder views?

you can't directly test rails (or other client software) searching within particular directory unless know specific methods calling , when calling them. can readily check result of calling view_path changes result of prepend_view_path call, however.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -