On Oct 19, 2010, at 9:15 PM, oren wrote:
I try to test sinatra app using rspec 2.0.0 and rack-test 0.5.6
it “redirect non-authenticated user to logout page” do
and I get:
undefined method `redirect_to?’ for #Rack::MockResponse:0xa43ef14
Take a look at
to see how be_redirect_to tries to delegate to redirect_to? on the
There is a redirect_to matcher in rspec-rails, but it delegates to a
Rails-specific assertion (assert_redirected_to), so you’re not going to
get that one in a Sinatra app.
where can I find reference/guide for methods I can use in rspec 2?
I think it might be here, but I am not sure where:
Documentation is there, plus:
And, of course, The RSpec Book: