Running Create action in RSpec gives error

36 views
Skip to first unread message

Joy Ganguly

unread,
Sep 30, 2014, 3:09:36 AM9/30/14
to rs...@googlegroups.com

Running Create action in RSpec gives error and here is my code with error details can anyone please help

https://gist.github.com/himadriganguly/48db55980b40c376cfcd

Jon Rowe

unread,
Sep 30, 2014, 4:51:37 AM9/30/14
to rs...@googlegroups.com
I’d say your wish list table doesn’t have a product_id column, maybe you haven’t applied your migrations to your test database.

Jon Rowe
---------------------------

On Tuesday, 30 September 2014 at 17:09, Joy Ganguly wrote:

Running Create action in RSpec gives error and here is my code with error details can anyone please help

https://gist.github.com/himadriganguly/48db55980b40c376cfcd

--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/94f8dabc-0a1c-4d11-b783-de3ef45d65e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joy Ganguly

unread,
Oct 6, 2014, 7:27:52 AM10/6/14
to rs...@googlegroups.com
Thanks buddy for the help.

Now in the destroy spec i am getting some error. Please help. Here is the details - https://gist.github.com/himadriganguly/48db55980b40c376cfcd

Can you tell me that after running rspec why i am getting the following line

Instance method "invalid?" is already defined in ActiveRecord::Base, use generic helper instead or set StateMachine::Machine.ig
nore_method_conflicts = true.

Thank you in advance.

Jon Rowe

unread,
Oct 6, 2014, 7:40:58 AM10/6/14
to rs...@googlegroups.com
Your hint here is "use generic helper instead or set StateMachine::Machine.ignore_method_conflicts = true.” I’d guess you have an overlapping database vs model method.

Jon Rowe
---------------------------

Joy Ganguly

unread,
Oct 6, 2014, 9:16:24 AM10/6/14
to rs...@googlegroups.com
Can you tell me that what is wrong in the destroy action code.

Thank you

Jon Rowe

unread,
Oct 6, 2014, 4:45:07 PM10/6/14
to rs...@googlegroups.com
You haven’t added that code into the gist so I can’t see it, and as I was saying, it seems you have an external gem called state_machine that is conflicting with your application code.

Jon Rowe
---------------------------

Reply all
Reply to author
Forward
0 new messages