aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-06-17 16:48:29 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-06-24 22:32:32 +0200
commit49e4c0f7944425629a29f967c66df03b14a0b890 (patch)
tree4fc8327046fa53112877a2511cd21ff3d8ae5fc2 /features/step_definitions
parentSeed with user with some unanswered questions. (diff)
downloadrecruiting-webapp-49e4c0f7944425629a29f967c66df03b14a0b890.tar.gz
recruiting-webapp-49e4c0f7944425629a29f967c66df03b14a0b890.tar.bz2
recruiting-webapp-49e4c0f7944425629a29f967c66df03b14a0b890.zip
Mentor demoting to recruit
Includes Cucumber scenario for feature that exists already: view listing of unanswered questions.
Diffstat (limited to 'features/step_definitions')
-rw-r--r--features/step_definitions/questions_steps.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/features/step_definitions/questions_steps.rb b/features/step_definitions/questions_steps.rb
index 5719612..c4d1957 100644
--- a/features/step_definitions/questions_steps.rb
+++ b/features/step_definitions/questions_steps.rb
@@ -11,3 +11,21 @@ Given /^a question "([^\"]*)" in category "([^\"]*)"$/ do |title, category|
@question.question_category = @question_category
@question.save!
end
+
+Given /^following questions:$/ do |table|
+ for question in table.raw
+ if question.size == 1
+ Given "a question \"#{question[0]}\""
+ elsif question.size == 2
+ Given "a question \"#{question[0]}\" in category \"#{question[1]}\""
+ else
+ fail "Each row of table should have one or two columns"
+ end
+ end
+end
+
+Then /^I should see following:$/ do |table|
+ for txt in table.raw.flatten
+ Then "I should see \"#{txt}\""
+ end
+end