aboutsummaryrefslogtreecommitdiffstats
path: root/features/step_definitions/category_steps.rb
blob: 3c197e28414c5099c004583201e211c2afc9da6e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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