Displaying 2 results from an estimated 2 matches for "headlinetest".
Did you mean:
headline_test
2006 Mar 23
7
Fixtures just Do Not Work for Me
...lishment, he pardodies several figures of
Brazilian showbiz in the rocking "Super-Her?is."
# more fixtures here
----------
My database table has columns named id, author, title, happened_at and
description as expected. My headline_test file is as follows
----------
class HeadlineTest < Test::Unit::TestCase
fixtures :headlines
def test_fixture
h = @headlines[''gita'']
puts h.title
end
end
----------
When I call the test with `ruby test/unit/headline_test'', I get the
following output:
----------------
1) Error:
test_fi...
2006 Mar 27
1
Tests not tiding up after themselves?
...ed suite test/unit/article_test
Started
.
Finished in 0.203 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
$ C:\devel\motiro>ruby test/unit/headline_test.rb | more
Loaded suite test/unit/headline_test
Started
EEEEEEEEEEE
Finished in 0.531 seconds.
1) Error:
test_cache_already_recorded(HeadlineTest):
ActiveRecord::StatementInvalid: Mysql::Error: #23000Cannot delete or update a pa
rent row: a foreign key constraint fails: DELETE FROM articles
----
The article tests use the :headlines, :articles and :changes fixtures
but the headline tests only need the :headlines and :articles
fixtures. If I...