Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==================Error for 09=========================================
- administrator$ rspec -e rq09
- WARN: Unresolved specs during Gem::Specification.reset:
- diff-lcs (< 2.0, >= 1.2.0)
- WARN: Clearing out unresolved specs.
- Please report a bug if this causes problems.
- Run options: include {:full_description=>/rq09/}
- Assignment
- rq09
- check seed file
- has a file for seeding the database (FAILED - 1)
- 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)
- 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)
- must have TodoList set up as directed (PENDING: around hook at ./spec/assignment_spec.rb:9 did not execute the example)
- must have TodoItems set up as directed (PENDING: around hook at ./spec/assignment_spec.rb:9 did not execute the example)
- Pending: (Failures listed here are expected and do not affect your suite's status)
- 1) Assignment rq09 check seed file must have Users with lastnames for usernames as directed in assignment
- # around hook at ./spec/assignment_spec.rb:9 did not execute the example
- # ./spec/assignment_spec.rb:211
- 2) Assignment rq09 check seed file must have Profiles set up for each user with the given data
- # around hook at ./spec/assignment_spec.rb:9 did not execute the example
- # ./spec/assignment_spec.rb:216
- 3) Assignment rq09 check seed file must have TodoList set up as directed
- # around hook at ./spec/assignment_spec.rb:9 did not execute the example
- # ./spec/assignment_spec.rb:226
- 4) Assignment rq09 check seed file must have TodoItems set up as directed
- # around hook at ./spec/assignment_spec.rb:9 did not execute the example
- # ./spec/assignment_spec.rb:233
- Failures:
- 1) Assignment rq09 check seed file has a file for seeding the database
- Failure/Error: TodoList.destroy_all
- ActiveRecord::StatementInvalid:
- SQLite3::SQLException: no such column: todo_items.todo_list_id: SELECT "todo_items".* FROM "todo_items" WHERE "todo_items"."todo_list_id" = ?
- # ./spec/assignment_spec.rb:202:in `block (4 levels) in <top (required)>'
- # ./spec/assignment_spec.rb:12:in `block (2 levels) in <top (required)>'
- # ------------------
- # --- Caused by: ---
- # SQLite3::SQLException:
- # no such column: todo_items.todo_list_id
- # ./spec/assignment_spec.rb:202:in `block (4 levels) in <top (required)>'
- Finished in 0.32303 seconds (files took 2.47 seconds to load)
- 5 examples, 1 failure, 4 pending
- Failed examples:
- rspec ./spec/assignment_spec.rb:208 # Assignment rq09 check seed file has a file for seeding the database
- ==================seeds.rb=========================================
- I am able to seed the database without an issue using following
- User.create([{ username: 'Fiorina', password_digest: 'fiorina' },
- { username: 'Trump', password_digest: 'trump' },
- { username: 'Carson', password_digest: 'carson' },
- { username: 'Clinton', password_digest: 'clinton' }])
- Profile.create([{gender: 'female', birth_year: 1954, first_name: 'Carly', last_name: 'Fiorina', user_id: 1},
- {gender: 'male', birth_year: 1946, first_name: 'Donald', last_name: 'Trump', user_id: 2},
- {gender: 'male', birth_year: 1951, first_name: 'Ben', last_name: 'Carson', user_id: 3},
- {gender: 'female', birth_year: 1947, first_name: 'Hillary', last_name: 'Clinton', user_id: 4}])
- User.all.each do |user|
- TodoList.create(list_name: "game#{user.id}", list_due_date: DateTime.now.to_date + 1.year, user_id: user.id)
- end
- TodoList.all.each do |todo|
- TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item1', description: 'description1', todo_lists_id: todo.id )
- TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item2', description: 'description2', todo_lists_id: todo.id )
- TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item3', description: 'description3', todo_lists_id: todo.id )
- TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item4', description: 'description4', todo_lists_id: todo.id )
- TodoItem.create(due_date: DateTime.now.to_date + 1.year, title: 'item5', description: 'description5', todo_lists_id: todo.id )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement