Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 KB | None | 0 0
  1.  
  2. ==================Error for 09=========================================
  3. administrator$ rspec -e rq09
  4. WARN: Unresolved specs during Gem::Specification.reset:
  5. diff-lcs (< 2.0, >= 1.2.0)
  6. WARN: Clearing out unresolved specs.
  7. Please report a bug if this causes problems.
  8. Run options: include {:full_description=>/rq09/}
  9.  
  10. Assignment
  11. rq09
  12. check seed file
  13. has a file for seeding the database (FAILED - 1)
  14. must have Users with lastnames for usernames as directed in assignment (PENDING: around hook at ./spec/assignment_spec.rb:9 did not execute the example)
  15. must have Profiles set up for each user with the given data (PENDING: around hook at ./spec/assignment_spec.rb:9 did not execute the example)
  16. must have TodoList set up as directed (PENDING: around hook at ./spec/assignment_spec.rb:9 did not execute the example)
  17. must have TodoItems set up as directed (PENDING: around hook at ./spec/assignment_spec.rb:9 did not execute the example)
  18.  
  19. Pending: (Failures listed here are expected and do not affect your suite's status)
  20.  
  21. 1) Assignment rq09 check seed file must have Users with lastnames for usernames as directed in assignment
  22. # around hook at ./spec/assignment_spec.rb:9 did not execute the example
  23. # ./spec/assignment_spec.rb:211
  24.  
  25. 2) Assignment rq09 check seed file must have Profiles set up for each user with the given data
  26. # around hook at ./spec/assignment_spec.rb:9 did not execute the example
  27. # ./spec/assignment_spec.rb:216
  28.  
  29. 3) Assignment rq09 check seed file must have TodoList set up as directed
  30. # around hook at ./spec/assignment_spec.rb:9 did not execute the example
  31. # ./spec/assignment_spec.rb:226
  32.  
  33. 4) Assignment rq09 check seed file must have TodoItems set up as directed
  34. # around hook at ./spec/assignment_spec.rb:9 did not execute the example
  35. # ./spec/assignment_spec.rb:233
  36.  
  37.  
  38. Failures:
  39.  
  40. 1) Assignment rq09 check seed file has a file for seeding the database
  41. Failure/Error: TodoList.destroy_all
  42.  
  43. ActiveRecord::StatementInvalid:
  44. SQLite3::SQLException: no such column: todo_items.todo_list_id: SELECT "todo_items".* FROM "todo_items" WHERE "todo_items"."todo_list_id" = ?
  45. # ./spec/assignment_spec.rb:202:in `block (4 levels) in <top (required)>'
  46. # ./spec/assignment_spec.rb:12:in `block (2 levels) in <top (required)>'
  47. # ------------------
  48. # --- Caused by: ---
  49. # SQLite3::SQLException:
  50. # no such column: todo_items.todo_list_id
  51. # ./spec/assignment_spec.rb:202:in `block (4 levels) in <top (required)>'
  52.  
  53. Finished in 0.32303 seconds (files took 2.47 seconds to load)
  54. 5 examples, 1 failure, 4 pending
  55.  
  56. Failed examples:
  57.  
  58. rspec ./spec/assignment_spec.rb:208 # Assignment rq09 check seed file has a file for seeding the database
  59.  
  60.  
  61. ==================seeds.rb=========================================
  62.  
  63. I am able to seed the database without an issue using following
  64. User.create([{ username: 'Fiorina', password_digest: 'fiorina' },
  65. { username: 'Trump', password_digest: 'trump' },
  66. { username: 'Carson', password_digest: 'carson' },
  67. { username: 'Clinton', password_digest: 'clinton' }])
  68.  
  69.  
  70. Profile.create([{gender: 'female', birth_year: 1954, first_name: 'Carly', last_name: 'Fiorina', user_id: 1},
  71. {gender: 'male', birth_year: 1946, first_name: 'Donald', last_name: 'Trump', user_id: 2},
  72. {gender: 'male', birth_year: 1951, first_name: 'Ben', last_name: 'Carson', user_id: 3},
  73. {gender: 'female', birth_year: 1947, first_name: 'Hillary', last_name: 'Clinton', user_id: 4}])
  74.  
  75.  
  76. User.all.each do |user|
  77.  
  78. TodoList.create(list_name: "game#{user.id}", list_due_date: DateTime.now.to_date + 1.year, user_id: user.id)
  79. end
  80.  
  81. TodoList.all.each do |todo|
  82. TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item1', description: 'description1', todo_lists_id: todo.id )
  83. TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item2', description: 'description2', todo_lists_id: todo.id )
  84. TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item3', description: 'description3', todo_lists_id: todo.id )
  85. TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item4', description: 'description4', todo_lists_id: todo.id )
  86. TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item5', description: 'description5', todo_lists_id: todo.id )
  87. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement