0

Trying to test my controller with RSpec how ever I am getting this error:

enter image description here

I looked at couple of stackoverflows but couldn't find the answer:

StackOverflowOne

StackOverflowTwo

StackOverflowThree

can some one please explain this error to me?

This is my Test case: enter image description here

This is my controller: enter image description here

This is my model: enter image description here

Community
  • 1
  • 1
click
  • 447
  • 1
  • 7
  • 25
  • Please provide actual code instead of images. Copy/paste is actually easier for both the asker and the answerer compared to posting code as images like you have – Wes Foster Dec 29 '15 at 17:00
  • I am more than a little surprised you can have a valid table named '''Application''' – MilesStanfield Dec 29 '15 at 17:22

1 Answers1

1

instead of post :create, app you need to post :create, id: app

with this exception, ruby is trying to tell you that you passed something that is not quacking like a hash into the post method, so it does not have a key? method on app.

i would like to recommend this article about debugging rails in development to you. it might help you improve your debugging skills.

another note: if you post a question to stackoverflow, you should paste real code instead of screenshots so that it's searchable for others and easy to copy and paste into answers.

phoet
  • 18,688
  • 4
  • 46
  • 74
  • @phoet Thank you very much for answering the question and pointing me to your article I am half way through and it is very useful. – click Dec 29 '15 at 21:37