Extract view path detection logic to method
Add tests for actual_view_path