Displaying 2 results from an estimated 2 matches for "delete_concept".
2006 May 06
6
assert_raises --> how does it work?
Hi,
I have this code fragment:
def test_delete_concept
assert_not_nil Concept.find(concepts(:entreprise).id)
get :delete_concept, {:concept_id => concepts(:entreprise).id}
assert_raises :RecordNotFound,
Concept.find(concepts(:entreprise).id)
end
basicaly, on the first line, I make sure that the concept exist in the
DB. On the second...
2006 May 17
0
teardown not cleaning the BD?
..._all
ClientVariation.delete_all
end
All the records from my DB should be deleted...
Well, when I run my test, I get a faillure on a test that is supposed to
make sure that a specific record is deleted. When I look at the DB, the
record is still there.
The test goes like this:
def test_delete_concept
#make sure the concept record is present
assert_not_nil Concept.find(concepts(:entreprise).id)
#make sure the variations record is present
assert_not_nil Variation.find_by_concept_id
(concepts(:entreprise).id)
#find a client_variation
first_variation = Variation.find_by_con...