scambra/devise_invitable — pull request #307 by oshoma (2013-04-25 15:15:27+00:00)
Title: Make #respond_to? calls compatible with Ruby 2.0.0

I'm not sure if you're officially supporting Ruby 2.0.0 yet, but this will help when you do.

devise_invitable relies on respond_to? to decide when to override methods such as #confirmation_required? that may be defined by other Devise modules. In Ruby 2.0, #respond_to? returns false for protected methods unless you pass true as a second method argument. This change in behavior caused 6 test breaks, including delivery of confirmation instructions email after calling #invite!

Tested with MRI Ruby 1.9.3-p392 and 2.0.0-p0 against mongoid (rake test DEVISE_ORM=mongoid).