Displaying 2 results from an estimated 2 matches for "headline_test".
2006 Mar 27
1
Tests not tiding up after themselves?
...cle class declares a "has_many" relationship to the
Change class. I have tests for the Article and Headline classes, and
if I run the article tests before the headline tests without
explicitly cleaning the database, I get a foreing key constraint
error. For example:
----
$ ruby test/unit/headline_test.rb
Loaded suite test/unit/headline_test
Started
...........
Finished in 0.312 seconds.
11 tests, 14 assertions, 0 failures, 0 errors
----
This runs nicely. But if I had run the article tests before, I get this
----
$ ruby test/unit/article_test.rb
Loaded suite test/unit/article_test
Started
.
Fi...
2006 Mar 23
7
Fixtures just Do Not Work for Me
...Brazilian rock. Acid
critic of establishment, 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
follo...