[rspec-users] testing a post to a controller's create action

David Chelimsky dchelimsky at gmail.com
Fri Nov 18 21:18:03 EST 2011


On Nov 18, 2011, at 7:42 PM, Patrick J. Collins wrote:

> I just spent a lot of time trying to get a test to pass that would not pass no
> matter what I did, and I finally decided to just do something really simple to
> verify that even that was working-- and it's not.
> 
> class PostsController < ApplicationController
> 
> 	def create
> 		debugger # or binding.pry
> 	end
> 
> end
> 
> --
> 
> #controllers/post_spec.rb
> 
> describe PostsController do
> 
> 	it "does not work" do
> 		post :create
> 	end
> 
> end
> 
> ...
> 
> I never see the debugger prompt..  Can anyone PLEASE tell me why this is not
> working?  In any other test, binding.pry or debugger interrupts the test flow
> and gives me access to the current scope of the debugger call.

Got any authentication in front of posts#create?


More information about the rspec-users mailing list