diff options
Diffstat (limited to 'features/step_definitions/category_steps.rb')
-rw-r--r-- | features/step_definitions/category_steps.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/features/step_definitions/category_steps.rb b/features/step_definitions/category_steps.rb new file mode 100644 index 0000000..3c197e2 --- /dev/null +++ b/features/step_definitions/category_steps.rb @@ -0,0 +1,11 @@ +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| + ::Refinery::BlogPost.last.categories.count.should == num_category.to_i +end + +Then /^the blog post should have the category "([^"]*)"$/ do |category| + ::Refinery::BlogPost.last.categories.first.title.should == category +end |