Just looking at adding the ActiveRecord::Base#find! method that was  
spoken about a while ago now, and just wondering what's the best way  
to add these tests in?

My problem is that for 75% of the tests in finder_test.rb [1] I also  
want to ensure that find! or find_by_name! or find_by_sql! works  
alongside the regular finds.

I can duplicate the tests:

   def test_find
     assert_equal(topics(:first).title, Topic.find(1).title)
   end

   def test_find_with_bang
     assert_equal(topics(:first).title, Topic.find!(1).title)
   end


or I can just add the test in below the other one:

   def test_find
     assert_equal(topics(:first).title, Topic.find(1).title)
     assert_equal(topics(:first).title, Topic.find!(1).title)
   end


or should it be in a new finder_with_bang.rb ?

Thoughts?

I don't want to bother making up a big patch if it has no chance of  
being applied.

-- tim

[1] http://dev.rubyonrails.org/svn/rails/trunk/activerecord/test/ 
finder_test.rb


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---

Reply via email to