Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Lose the acts_as_tree stuff
Browse files Browse the repository at this point in the history
git-svn-id: http://www.infused.org/svn/plugins/test_injector@23 694b6922-ce17-0410-93af-c5f0f3c483be
  • Loading branch information
keithm committed Jul 27, 2006
1 parent 0bdf46d commit 72c4be5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
5 changes: 1 addition & 4 deletions trunk/README
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@ into the unit test:
TODO
====

- Test polymorphic associations
- Better tests on polymorphic associations
- Test standard validations
- Test that the associations order_by columns exist
- Test acts_as_list
- Test acts_as_tree
10 changes: 0 additions & 10 deletions trunk/lib/test_injector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def inject_activerecord_tests
inject_association_tests
define_acts_as_versioned_test(klass) if klass.respond_to?(:acts_as_versioned) and klass.respond_to?(:versioned_table_name)
define_optimistic_locking_test(klass) if klass.column_names.include?("lock_version") && ActiveRecord::Base.lock_optimistically == true
define_acts_as_tree_test(klass) if klass.include?(ActiveRecord::Acts::Tree::InstanceMethods)
end
end

Expand Down Expand Up @@ -135,15 +134,6 @@ def define_optimistic_locking_test(base)
end
end

def define_acts_as_tree_test(base)
define_method "test_acts_as_tree_destroys_children" do
model = base.find(:first)
assert model.destroy
child_ids = all_descendants(model) + [model.id]
child_ids.each {|r| assert_raises(ActiveRecord::RecordNotFound) {base.find(r)}}
end
end

end

end

0 comments on commit 72c4be5

Please sign in to comment.