Advertisement
Guest User

Untitled

a guest
Jan 8th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. # This file should contain all the record creation needed to seed the database with its default values.
  2. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
  3. #
  4. # Examples:
  5. #
  6. # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
  7. # Mayor.create(name: 'Emanuel', city: cities.first)
  8. tests = Test.create([{ description: "Feb 2016 Cohort", pass_score: 4 },
  9. { description: "Ronin Feb 2016", pass_score: 4 },
  10. { description: "Mar 2016 Cohort", pass_score: 5 },
  11. { description: "Ronin Mar 2016", pass_score: 4 }])
  12.  
  13. questions = Question.create([{question_text: "Add the value \"codewars\" to the websites array.",
  14. rspec_test: "describe Array do\nexpect(websites).to_eq([\"Ronin\"])\nend" },
  15. {question_text: "The websites = [1, 2, 3]. Set the variable val to the last element of the websites array",
  16. rspec_test: "describe Array do\nexpect(val).to_eq(3)\nend"},
  17. {question_text: "The numbers array = [1, 2, 3]. Add all the elements of the array together and assign to total",
  18. rspec_test: "describe Array do\nexpect(total).to_eq(6)\nend"}
  19. ])
  20. Applicant.create!(name: "Dan", email:"dan@dan.com", test_id: 1, score: 3)
  21. Applicant.create!(name: "Norm", email:"norm@example.com", test_id: 1, score: 3)
  22. Applicant.create!(name: "Yev", email:"yev@incredible.com", test_id: 1, score: 3)
  23. Applicant.create!(name: "Jay", email:"jay@jay.com", test_id: 1, score: 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement