aboutsummaryrefslogtreecommitdiffstats
path: root/features/support/step_definitions
diff options
context:
space:
mode:
authorMichael Gall <michael@wakeless.net>2011-06-08 10:57:15 +1000
committerMichael Gall <michael@wakeless.net>2011-06-08 10:57:15 +1000
commit63ec02d44e3063c2c92e99f13fb7525660d25956 (patch)
treea97c14b4a4032824d7fefc26e3a187d00fe3ca21 /features/support/step_definitions
parent5f31b50b61f6601a18f62a83f2a36a5a0452684c (diff)
downloadrefinerycms-blog-63ec02d44e3063c2c92e99f13fb7525660d25956.tar.gz
refinerycms-blog-63ec02d44e3063c2c92e99f13fb7525660d25956.tar.bz2
refinerycms-blog-63ec02d44e3063c2c92e99f13fb7525660d25956.zip
Add spec for blog post categories
Diffstat (limited to 'features/support/step_definitions')
-rw-r--r--features/support/step_definitions/category_steps.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/features/support/step_definitions/category_steps.rb b/features/support/step_definitions/category_steps.rb
new file mode 100644
index 0000000..31176b4
--- /dev/null
+++ b/features/support/step_definitions/category_steps.rb
@@ -0,0 +1,11 @@
+Given /^there is a category titled "([^"]*)"$/ do |title|
+ @category = Factory(:blog_category, :title => title)
+end
+
+Then /^the blog post should have "([^"]*)" category$/ do |num_category|
+ BlogPost.last.categories.count.should == num_category
+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