get the first cucumber feature running: calendar

This commit is contained in:
Reinier Balt 2012-04-30 13:51:42 +02:00
parent 393eae1937
commit c9d64e6f4b
28 changed files with 400 additions and 418 deletions

View file

@ -14,7 +14,7 @@ Given /^I have a todo "([^"]*)" in context "([^"]*)" with tags "([^"]*)"$/ do |d
end
Given /^I have a todo "([^"]*)" in the context "([^"]*)" which is due tomorrow$/ do |description, context_name|
context = @current_user.contexts.find_or_create(:name => context_name)
context = @current_user.contexts.find_or_create_by_name(context_name)
@todo = @current_user.todos.create!(:context_id => context.id, :description => description)
@todo.due = @todo.created_at + 1.day
@todo.save!