Skip to content

Commit

Permalink
quiz example
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Yoon committed Feb 9, 2011
1 parent 2304fe6 commit 7092d8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion generators/surveyor/surveyor_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def manifest
end

# Surveys
m.directory "surveys/fixtures"
m.file "surveys/kitchen_sink_survey.rb", "surveys/kitchen_sink_survey.rb"
m.file "surveys/quiz.rb", "surveys/quiz.rb"

m.readme "README"

Expand Down
10 changes: 10 additions & 0 deletions generators/surveyor/templates/surveys/quiz.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
survey "Favorites" do
section "Foods" do
# In a quiz, both the questions and the answers need to have reference identifiers
# Here, the question has reference_identifier: "1", and the answers: "oint", "tweet", and "moo"
question_1 "What is the best meat?", :pick => :one, :correct => "oink"
a_oink "bacon"
a_tweet "chicken"
a_moo "beef"
end
end

0 comments on commit 7092d8f

Please sign in to comment.