aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'features/step_definitions/documentation_feedback_steps.rb')
-rw-r--r--features/step_definitions/documentation_feedback_steps.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/features/step_definitions/documentation_feedback_steps.rb b/features/step_definitions/documentation_feedback_steps.rb
new file mode 100644
index 0000000..58dcb98
--- /dev/null
+++ b/features/step_definitions/documentation_feedback_steps.rb
@@ -0,0 +1,16 @@
+Then /^I should see tag <([^<>]*)>$/ do |tag|
+ /#{tag}/.match(response.body).should_not be_nil
+end
+
+Then /^I should not see tag <([^<>]*)>$/ do |tag|
+ /#{tag}/.match(response.body).should be_nil
+end
+
+Then /^I should see pie chart with feedback for "([^"]*)"$/ do |question|
+ Given "a question \"#{question}\""
+ Then "I should see tag <iframe src=\"/questions/#{@question.id}/doc_feedback_chart\">"
+end
+
+Then /^I should see no pie chart with feedback$/ do
+ Then 'I should not see tag <iframe src="/questions/\d+/doc_feedback_chart">'
+end