Hi All,

Anyone noticed that using the newer link_to syntax in edge currently  
fails with mocked objects in view specs or helpers.

eg. if you have something like the following in your view (or  
equivalent in a helper):

        <%= link_to @dog.name, @dog %>

as opposed to the current 1.2 syntax:

        <%= link_to @dog.name, dog_path(@dog) %>

Using a mock_model as the 'dog' will raise a:

        undefined method `polymorphic_path' for [Dynamically generated class  
for RSpec example]:#<Class:0x26814f4>

error - I presume due to the introspection on the @dog object to find  
out what kind of class it is to create it's URL.

Anyone worked around this at all, other than using the older syntax?  
Any ideas appreciated.

Cheers,

Marcus
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to