[rspec-users] acts_as_authenticated error with Object#id

David Chelimsky dchelimsky at gmail.com
Wed Feb 28 19:02:34 EST 2007


On 2/28/07, Kevin Williams <kevwil at gmail.com> wrote:
> I'm getting this when I run my Rails controller specs.
>
> <projectroot>/config/../lib/authenticated_system.rb:16: warning: Object#id
> will be deprecated; use Object#object_id
>
> I added "include AuthenticatedTestHelper" to /spec/spec_helper.rb so
> that my controller tests^H^H^H^H^Hspecs can use the "login_as" helper
> method. Anyone know how to fix this?

This usually comes from something calling #id on a mock of a model.
Are you mocking any AR models? If so, be sure to
stub!(:id).and_return(a_string).

David

>
>
> --
> Cheers,
>
> Kevin Williams
> http://www.almostserio.us/
>
> "Any sufficiently advanced technology is indistinguishable from
> Magic." - Arthur C. Clarke
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list