On Thu, Mar 19, 2009 at 8:46 AM, Zhenning Guan <[email protected]> wrote:
> usually, I just use this way.
>
> =====
> @weather = mock_model(Weather)
> =====
>
> but recently I saw this. so what's the :to_param and :save options
> meaning?
>
> ======
> @weather = mock_model(Weather, :to_param => "1", :save => true)
> ======

http://www.railsbrain.com/api/rails-2.2.2/doc/index.html?a=M001952&name=to_param

It's a Rails thing, used when converting an object to a URL representation.


> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to