aboutsummaryrefslogtreecommitdiffstats
path: root/features/support/step_definitions/category_steps.rb
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2011-06-29 13:23:21 +1200
committerPhilip Arndt <parndt@gmail.com>2011-06-29 13:23:48 +1200
commitb725799fef031ca253e30236e5286edfd85c5cc8 (patch)
tree4f2f017b1b118c782e90076e31714fe540d3fd9d /features/support/step_definitions/category_steps.rb
parentcf335800dad86ef9631bf83ccdd5c4855cc40153 (diff)
downloadrefinerycms-blog-b725799fef031ca253e30236e5286edfd85c5cc8.tar.gz
refinerycms-blog-b725799fef031ca253e30236e5286edfd85c5cc8.tar.bz2
refinerycms-blog-b725799fef031ca253e30236e5286edfd85c5cc8.zip
Refactored the spec suite to be consistent.
Diffstat (limited to 'features/support/step_definitions/category_steps.rb')
-rw-r--r--features/support/step_definitions/category_steps.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/features/support/step_definitions/category_steps.rb b/features/support/step_definitions/category_steps.rb
index 31176b4..891b5c0 100644
--- a/features/support/step_definitions/category_steps.rb
+++ b/features/support/step_definitions/category_steps.rb
@@ -1,11 +1,11 @@
Given /^there is a category titled "([^"]*)"$/ do |title|
- @category = Factory(:blog_category, :title => title)
+ @category = Factory.create(:blog_category, :title => title)
end
-Then /^the blog post should have "([^"]*)" category$/ do |num_category|
- BlogPost.last.categories.count.should == num_category
+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|
+Then /^the blog post should have the category "([^"]*)"$/ do |category|
BlogPost.last.categories.first.title.should == category
end \ No newline at end of file