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
Post a Comment