# Running tests for acts\_as\_tree plugin

**URL:** <https://www.ruby-forum.com/t/running-tests-for-acts-as-tree-plugin/153727>\
**Category:** Rails\
**Created:** [November 20, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/running-tests-for-acts-as-tree-plugin/153727 "2008-11-20T16:23:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stickstone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Post date:** [November 20, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/running-tests-for-acts-as-tree-plugin/153727/1 "2008-11-20T16:23:47Z")

</div>

If I checkout the acts\_as\_tree plugin from  
git://github.com/rails/acts\_as\_tree.git and try to run its unit tests, I  
get a failure:

$ rake  
(in /u/home/brian/git/acts\_as\_tree)  
/usr/local/bin/ruby -Ilib:lib  
“/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake\_test\_loader.rb”  
“test/acts\_as\_tree\_test.rb”  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active\_support/dependencies.rb:276:in  
`load_missing_constant': uninitialized constant ActiveRecord::Acts (NameError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:468:in`const\_missing’  
from ./test/…/init.rb:1  
… etc

However, I can make them run if I make a one-line addition to init.rb:

diff --git a/init.rb b/init.rb  
index 0901ddb…3e4d07b 100644  
— a/init.rb  
+++ b/init.rb  
@@ -1 +1,2 @@  
+require ‘active\_record/acts/tree’  
ActiveRecord::Base.send :include, ActiveRecord::Acts::Tree

Is there something odd about my environment, or is this an error in the  
plugin? I have rails 2.1.2 and rake 0.8.3 gems installed, but I’m  
testing acts\_as\_tree separately, not within a rails project.

Thanks,

Brian C…
