Displaying 1 result from an estimated 1 matches for "department_test".
2007 Jan 17
2
rake test and validates_inclusion_of
...am unit testing. The tests for each
unit run successfully, but when I do a rake test, many of the tests
fail.
The assertions that fail are always ones that are asserting that a
model, which has a reference to another model, is OK. So for example,
one assertion that passes when I do `ruby
test/unit/department_test.rb`, but fails when I do `rake test` is:
department = Department.new(:name => "super department",
:parent_id => departments(:administration_department).id)
assert department.save
When I print out department.errors, I see that parent_id is invalid
because it "is not i...