I face the following problem for a POST create action spec.
I have this controller: http://pastie.org/482270
I wrote this spec: http://pastie.org/482273
The spec “should set @context” works fine.
But when running the spec “should build a new message” I got this error:
<Page(id: integer, title: string, content: text, created_at: datetime,
updated_at: datetime) (class)> expected :new with
“content”=>“page d’introduction”}) once, but received it 0 time
I can not find why Page model does not receive new call, and playing
I can have the spec running successfully when I remove :create from the
#before_filter :get_context_from_session, :only => [:new, :create,
before_filter :get_context_from_session, :only => [:new, :index]
It does not make sense for me. I probably miss something but I can not
Any ideas? Thanks by advance