aboutsummaryrefslogtreecommitdiffstats
path: root/features/support/paths.rb
diff options
context:
space:
mode:
Diffstat (limited to 'features/support/paths.rb')
-rw-r--r--features/support/paths.rb34
1 files changed, 14 insertions, 20 deletions
diff --git a/features/support/paths.rb b/features/support/paths.rb
index 1fdf9f8..f69b8fe 100644
--- a/features/support/paths.rb
+++ b/features/support/paths.rb
@@ -1,24 +1,18 @@
-module NavigationHelpers
- module Refinery
- module Blog
- def path_to(page_name)
- case page_name
- when /the list of blog posts/
- refinery_admin_blog_posts_path
- when /the new blog posts? form/
- new_refinery_admin_blog_post_path
- else
- begin
- if page_name =~ /the blog post titled "?([^\"]*)"?/ and (page = BlogPost.find_by_title($1)).present?
- self.url_for(page.url)
- else
- nil
- end
- rescue
- nil
- end
- end
+def path_to(page_name)
+ case page_name
+ when /the list of blog posts/
+ refinery_admin_blog_posts_path
+ when /the new blog posts? form/
+ new_refinery_admin_blog_post_path
+ else
+ begin
+ if page_name =~ /the blog post titled "?([^\"]*)"?/ and (page = BlogPost.find_by_title($1)).present?
+ self.url_for(page.url)
+ else
+ nil
end
+ rescue
+ nil
end
end
end