Forum: Ruby on Rails Rspec

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ddb6878f8bf69dc96984a00ba578a1a4?d=identicon&s=25 Shakthi Murugan (shakthi)
on 2009-04-22 09:03
 How i can write spec for already existing model???? i need to write the
test cases for already existing model......
5772c599ccab3081e0fffb1d54f3b6de?d=identicon&s=25 Andrew Timberlake (andrewtimberlake)
on 2009-04-22 10:22
(Received via mailing list)
On Wed, Apr 22, 2009 at 9:03 AM, Shakthi Murugan
<rails-mailing-list@andreas-s.net> wrote:
>
>  How i can write spec for already existing model???? i need to write the
> test cases for already existing model......

The same way you would for a model you don't have.

Look at the model, and identify all that it does, then write tests to
ensure that does all you assume it to do (and not do)

Andrew Timberlake
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

"I have never let my schooling interfere with my education" - Mark Twain
This topic is locked and can not be replied to.