Displaying 1 result from an estimated 1 matches for "root_dept".
2006 Aug 14
6
Testing fails with fixtures not when invoked directly
...anizationTest < Test::Unit::TestCase
fixtures :organizations
def setup
@smo = organizations(:smo)
end
def test_department_company_defaults_to_parent
org = Department.new(:name => ''company'',:cost_code => ''123'', :parent_id
=> organizations(:root_dept))
assert org.valid?
assert org.company_id = organizations(:root_dept).company_id
end
end
This fails when loading the fixtures file from rake but works if I do the
test by itself
ruby test/unit/test_organization.rb => this works
rake => fails
D:\workspace\directory>rake
(in...