migrate selenium script for integrations page and enhance the story

This commit is contained in:
Reinier Balt 2010-05-05 19:09:51 +02:00
parent 44c61d942a
commit d6e20a76c2
6 changed files with 74 additions and 15 deletions

View file

@ -1,7 +1,18 @@
Given /^I have no contexts$/ do
# should probably not be needed as you use this given at the start of a scenario
Context.delete_all
end
Given /^I have a context called "([^\"]*)"$/ do |context_name|
@context = @current_user.contexts.create!(:name => context_name)
end
Given /^I have the following contexts:$/ do |table|
table.hashes.each do |context|
Given 'I have a context called "'+context[:context]+'"'
end
end
Given /^I have a context "([^\"]*)" with (.*) actions$/ do |context_name, number_of_actions|
context = @current_user.contexts.create!(:name => context_name)
1.upto number_of_actions.to_i do |i|