[rspec-users] RSPEC how to post to a controller? What's wrong with this?
bhellman1 at gmail.com
Sat Mar 19 17:32:46 EDT 2011
I'm trying to post to my controller in RSPEC by doing:
it "should store create an IncomingMail record" do
:from => 'xx',
:to => 'xx',
:cc => 'xx',
:subject => 'xx',
:message_text => 'xx',
:message_html => 'xx'
}.should change(IncomingMail, :count).by(1)
I do have this in my rake routes: POST /incoming_mails(.:format)
I checked the logs. While the test above is hitting the controller, it is
never going inside the method def create. Any ideas why?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users