diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/authors.feature | 15 | ||||
-rw-r--r-- | features/category.feature | 23 | ||||
-rw-r--r-- | features/support/factories/blog_categories.rb | 5 | ||||
-rw-r--r-- | features/support/factories/blog_comments.rb | 8 | ||||
-rw-r--r-- | features/support/factories/blog_posts.rb | 9 | ||||
-rw-r--r-- | features/support/paths.rb | 24 | ||||
-rw-r--r-- | features/support/step_definitions/authors_steps.rb | 7 | ||||
-rw-r--r-- | features/support/step_definitions/category_steps.rb | 11 | ||||
-rw-r--r-- | features/support/step_definitions/tags_steps.rb | 13 | ||||
-rw-r--r-- | features/tags.feature | 26 |
10 files changed, 0 insertions, 141 deletions
diff --git a/features/authors.feature b/features/authors.feature deleted file mode 100644 index f3fd3ec..0000000 --- a/features/authors.feature +++ /dev/null @@ -1,15 +0,0 @@ -@blog @blog_authors -Feature: Blog Post Authors - Blog posts can be assigned authors through the given user model - current_user is assumed through admin screens - - Scenario: Saving a blog post in blog_posts#new associates the current_user as the author - Given I am a logged in refinery user - - When I am on the new blog post form - And I fill in "Title" with "This is my blog post" - And I fill in "blog_post_body" with "And I love it" - And I press "Save" - - Then there should be 1 blog post - And the blog post should belong to me
\ No newline at end of file diff --git a/features/category.feature b/features/category.feature deleted file mode 100644 index 6af1075..0000000 --- a/features/category.feature +++ /dev/null @@ -1,23 +0,0 @@ -@blog @blog_categories -Feature: Blog Post Categories - Blog posts can be assigned categories - - Background: - Given I am a logged in refinery user - Given there is a category titled "Videos" - - Scenario: The blog post new/edit form has category_list - When I am on the new blog post form - Then I should see "Tags" - Then I should see "Videos" - - Scenario: The blog post new/edit form saves categories - When I am on the new blog post form - And I fill in "Title" with "This is my blog post" - And I fill in "blog_post_body" with "And I love it" - And I check "Videos" - And I press "Save" - - Then there should be 1 blog post - And the blog post should have 1 category - And the blog post should have the category "Videos"
\ No newline at end of file diff --git a/features/support/factories/blog_categories.rb b/features/support/factories/blog_categories.rb deleted file mode 100644 index 2b47a87..0000000 --- a/features/support/factories/blog_categories.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'factory_girl' - -Factory.define(:blog_category) do |f| - f.sequence(:title) { |n| "Shopping #{n}" } -end diff --git a/features/support/factories/blog_comments.rb b/features/support/factories/blog_comments.rb deleted file mode 100644 index 9405c42..0000000 --- a/features/support/factories/blog_comments.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'factory_girl' - -Factory.define(:blog_comment) do |f| - f.name "Joe Commenter" - f.sequence(:email) { |n| "person#{n}@example.com" } - f.body "Which one is the best for picking up new shoes?" - f.association :post, :factory => :blog_post -end diff --git a/features/support/factories/blog_posts.rb b/features/support/factories/blog_posts.rb deleted file mode 100644 index 4584fec..0000000 --- a/features/support/factories/blog_posts.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'factory_girl' - -Factory.define(:blog_post, :class => BlogPost) do |f| - f.sequence(:title) { |n| "Top #{n} Shopping Centers in Chicago" } - f.body "These are the top ten shopping centers in Chicago. You're going to read a long blog post about them. Come to peace with it." - f.draft false - f.tag_list "chicago, shopping, fun times" - f.published_at Time.now -end diff --git a/features/support/paths.rb b/features/support/paths.rb deleted file mode 100644 index dbd04dd..0000000 --- a/features/support/paths.rb +++ /dev/null @@ -1,24 +0,0 @@ -module NavigationHelpers - module Refinery - module Blog - def path_to(page_name) - case page_name - when /the list of blog posts/ - admin_blog_posts_path - when /the new blog posts? form/ - new_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 - end - end -end diff --git a/features/support/step_definitions/authors_steps.rb b/features/support/step_definitions/authors_steps.rb deleted file mode 100644 index d78ca90..0000000 --- a/features/support/step_definitions/authors_steps.rb +++ /dev/null @@ -1,7 +0,0 @@ -Then /^there should be (\d+) blog posts?$/ do |num| - BlogPost.all.size == num -end - -Then /^the blog post should belong to me$/ do - BlogPost.first.author.login == User.last.login -end
\ No newline at end of file diff --git a/features/support/step_definitions/category_steps.rb b/features/support/step_definitions/category_steps.rb deleted file mode 100644 index 891b5c0..0000000 --- a/features/support/step_definitions/category_steps.rb +++ /dev/null @@ -1,11 +0,0 @@ -Given /^there is a category titled "([^"]*)"$/ do |title| - @category = Factory.create(:blog_category, :title => title) -end - -Then /^the blog post should have ([\d]*) categor[yies]{1,3}$/ do |num_category| - BlogPost.last.categories.count.should == num_category.to_i -end - -Then /^the blog post should have the category "([^"]*)"$/ do |category| - BlogPost.last.categories.first.title.should == category -end
\ No newline at end of file diff --git a/features/support/step_definitions/tags_steps.rb b/features/support/step_definitions/tags_steps.rb deleted file mode 100644 index 8280474..0000000 --- a/features/support/step_definitions/tags_steps.rb +++ /dev/null @@ -1,13 +0,0 @@ -Given /^there is a blog post titled "([^"]*)" and tagged "([^"]*)"$/ do |title, tag_name| - @blog_post = Factory.create(:blog_post, :title => title, :tag_list => tag_name) -end - -When /^I visit the tagged posts page for "([^"]*)"$/ do |tag_name| - @blog_post ||= Factory.create(:blog_post, :tag_list => tag_name) - tag = BlogPost.tag_counts_on(:tags).first - visit tagged_posts_path(tag.id, tag_name.parameterize) -end - -Then /^the blog post should have the tags "([^"]*)"$/ do |tag_list| - BlogPost.last.tag_list == tag_list.split(', ') -end diff --git a/features/tags.feature b/features/tags.feature deleted file mode 100644 index 24dff2a..0000000 --- a/features/tags.feature +++ /dev/null @@ -1,26 +0,0 @@ -@blog @blog_tags -Feature: Blog Post Tags - Blog posts can be assigned tags - - Background: - Given I am a logged in refinery user - - Scenario: The blog post new/edit form has tag_list - When I am on the new blog post form - Then I should see "Tags" - - Scenario: The blog post new/edit form saves tag_list - When I am on the new blog post form - And I fill in "Title" with "This is my blog post" - And I fill in "blog_post_body" with "And I love it" - And I fill in "Tags" with "chicago, bikes, beers, babes" - And I press "Save" - - Then there should be 1 blog post - And the blog post should have the tags "chicago, bikes, beers, babes" - - Scenario: The blog has a "tagged" route & view - Given there is a blog post titled "I love my city" and tagged "chicago" - When I visit the tagged posts page for "chicago" - Then I should see "Chicago" - And I should see "I love my city"
\ No newline at end of file |