Displaying 1 result from an estimated 1 matches for "test_find_with_bang".
2006 Oct 05
0
Where to add ActiveRecord::Base#find! tests
...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 fi...