From 5a168beef9823f61569f112a0d17c0b4feaf3c27 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 14 Sep 2011 13:49:06 +0200 Subject: [PATCH] fix failing tests because of newer acts_as_list gem Signed-off-by: Reinier Balt --- features/step_definitions/project_steps.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/features/step_definitions/project_steps.rb b/features/step_definitions/project_steps.rb index cd0c9dc9..66581d70 100644 --- a/features/step_definitions/project_steps.rb +++ b/features/step_definitions/project_steps.rb @@ -1,6 +1,9 @@ Given /^I have a project "([^\"]*)" with (.*) todos$/ do |project_name, num_todos| @context = @current_user.contexts.find_or_create_by_name("Context A") @project = @current_user.projects.create!(:name => project_name) + # acts_as_list adds at top by default, but that is counter-intuitive when reading scenario's, so reverse this + @project.move_to_bottom + 1.upto num_todos.to_i do |i| @current_user.todos.create!( :project_id => @project.id, @@ -13,6 +16,8 @@ Given /^there exists a project "([^\"]*)" for user "([^\"]*)"$/ do |project_name user = User.find_by_login(user_name) user.should_not be_nil @project = user.projects.create!(:name => project_name) + # acts_as_list adds at top by default, but that is counter-intuitive when reading scenario's, so reverse this + @project.move_to_bottom end Given /^there exists a project called "([^"]*)" for user "([^"]*)"$/ do |project_name, login|