features/step_definitions/news_steps.rb in refinerycms-news-1.0 vs features/step_definitions/news_steps.rb in refinerycms-news-1.0.1
- old
+ new
@@ -15,10 +15,10 @@
Given /^I have no news items$/ do
NewsItem.delete_all
end
Given /^the news item titled "?([^\"]*)"? is not published$/ do |title|
- NewsItem.find_by_title(title).update_attribute(:publish_date, Time.now + 1.day)
+ NewsItem.where(:title => title).first.update_attribute(:publish_date, Time.now + 1.day)
end
Then /^I should have ([0-9]+) news items?$/ do |count|
NewsItem.count.should == count.to_i
end